How would I power and control a Raspberry Pi and 12V DC window motor with the same battery?
The car widow motor has a worm gear that makes it operate at a low speed and high torque as it is, supplied by 12 volts. You should determine what its speed is with a 12-vlot supply. Then determine if your project needs to operate at just one speed or over some range of speeds. Determine the maximum and minimum speeds that will ever be needed. If the maximum speed is less than the motor speed for 12 volts, it would be best to add some means like a belt an pulleys to to reduce the speed further mechanically. That will further increase the available torque. Reducing the speed mechanically to the maximum speed required will most efficiently use the motor. Electronic speed control should be used only to provide adjustable speed, not to reduce the maximum speed.

You can use a single 12-volt battery or power supply to power both the Raspberry Pi and the motor. You will need a voltage regulator to reduce the voltage to 5 V for the Raspberry Pi. You will need some noise filtering to prevent noise from the motor's commutator from interfering with the Raspberry Pi.

A PWM controlled H bridge can be used to control the motor speed by reducing the effective voltage from 12 volts.

The battery needs to be sized to supply the maximum total current that the motor and Raspberry Pi might need. The loads will only draw the current they need. There is no need to worry about excess supply.