Powering a 5v raspberry pi, a 12v motor and a 24v motor using 2 batteries charged with a solar panel
One connected to each 12v lead acid battery, wired in parallel to the solar panel.


You can't do this, because these solar controllers are not isolated. Most of the controllers are not isolated for efficiency purposes.

For your power scheme where the maximum load is at 24V the most efficient method is to charge both batteries in series (24V) with 24V compatible solar controller and 24V compatible (like 28V MPP and 35-40V open circuit) solar panel. Then you get a DC/DC buck regulator with input from 20V to 30V and output 12V/1W+ (0.1A+) and another DC/DC buck regulator with input from 20V to 30V and output 5V/2A+ for the Raspberry.

The regulator for the 1W motor could be linear, but it would dissipate about 1-1.5W and for a battery operated equipment it is always better to look for the higher efficiency so a switch-mode DC/DC is preferred here. Also depending on motor's characteristics and especially start-up current you may need some power reserve. 

For the Raspberry your only choice is to use switch-mode DC/DC because linears will have terrible performance.