I did a similar project with a Power Wheels Wild Thing and an Arduino. I settled on buying a couple of BTS7960B motor controllers. They are rated for 43 amps, and I assume they will work for a Pi though I haven't done it myself.
Someone used these controllers on a Pi, they may have some helpful pointers.
Below is a simple diagram showing how to hook it up.
It seems your L298N is damaged. A switch can never cause this much problem. Try to power raspberry and the module seperately. You r circuit shows that the power of raspberry is drawn from the module thorugh the regulator on the module.
The L293DNE is a chip and provides no voltage regulation. It requires two voltage INPUTS. One at 5V (Vcc1) for its internal logic and one at the motor voltage (Vcc2) you plan to use.
Of course you could power the Pi from the same source you plan to provide 5V to the chip.