PEX can be used for water inside a home, and also CPVC
PVC can only be used for underwater supply of cold water.
Waste and vents can be ABS or PVC, depending on local code.
I presumed that O2 barrier PEX and PEX in general is more likely to be compromised by various VOC's and solvents in poly urethane, butyl, asphalt flashings, and and spray foams than PVC. But I am told by a plumber that PEX is much heartier than PVC.