Control two batteries with one switch?
No, what you show is a bad idea.  With the switch open, there will be 7 V applied between the "amp circuit" power and the raspberry pi power.  Not only will that drain the batteries, but it could have strange consequences to either or both circuits.

Use a double-pole switch or two separate switches.

Another possibility is to create the 5 V power from the 12 V power.  Then you only need to switch the 12 V for on/off.