Trying to Lay New Trim Straight
The best thing to do is shim the studs that the baseboard is nailed to.
If the difference is 1/2&quot; then add a 1/2&quot; piece of wood to the stud on the right side of the picture.  Use a straight edge from the newly shimmed stud to the stud on the far left, measure and install shims to the studs in between to get out the same distance.  I can't tell what the wood is that is behind the baseboard - I can see some studs.  You don't need to shim all the wood just every 16&quot; ( standard spacing for studs ) and just mark the floor so you know where to nail.
If the distance is fractional you can do other things like take wood screws with flat heads and use those to hold the baseboard off the surface of the studs.  You probably want two screws so the baseboard is held off in a reasonably firm way - one at maybe 1/4&quot; shy of the top and one 1/4&quot; shy of the bottom ( just choose a height that you can avoid when you trim nail the baseboard to the studs ).
It looks like you are re-doing your flooring.  Put the baseboards on after the flooring.