That is a very tough thing to gauge with those type of tub surrounds….
I know a lot of plumbers that leave the valve unattached to anything (as showen in your diagram) and then cut the hole centered in surround where needed, and use wood blocking between valve and surround (tightening escutcheon plate to keep things in place)
I would probably advice having a 2 x 6 or some kind of blocking between studs where valve would be placed, then screw it in place after the surround is in place. That way you can add blocking/shims behind valve to get into correct depth.
As far as the tub spout…..you will need to anchor that before tub surround. I’d probably set blocking 1″ recessed behind front of framing and fasten it there.
Other alternative, it so try to get an accurate depth of where the finished surface will be for surround and adjust and mount valve to that amount.
Any sorry, your right, we haven’t gotten into the fiberglass or plastic surrounds….Guess because most people are tearing those out and doing tile…..