PVC rated for venting is legal in CA for condensing units.
Venting is allowed under a soffit or shed-roof or covered patio that is not walled-in, so long as you meet all clearance requirements to operable windows, doors & air-intakes. IIRC you need a minimum of 2' of vertical clearance between the vent and the overhanging roof/soffit.
It absolutely need a means of dealing with flue condensate, particularly if you have long vertical runs. Short side-vent runs incur less condensate volume, but condensate traps/drains are still a good idea there too (especially in cooler climates) rather than letting it run and drip out the side. There MUST be some amount of slope in the lateral the drops away from the tankless and toward the condensate trap/drain- allowing flue condensate run back and drip onto the heat exchanger will damage it. A sideways-U may be needed in the venting directly above the tankless to accommodate it in your otherwise all-vertical installation. Four ells to form the U knocks something like ~6' off the maximum allowable length, but unless this is a 3 story house with the tankless in a basement you'd probably be able to roof-vent it if desired (you're allowed ~33' of straight section with 4 ells.) That many ells would also require 3" rather than 2" vent.
Roof terminations can be either a combined concentric version as in your picture, or separate, with the intake being an inverted-U:
In snowy areas (not SoCal) side venting is much preferred, since the localized melting from the heat of the vent contributes to ice-damming issues.