this is a bigger project than you realize.
I don't believe a raspberry pi has enough IO to do anything but a very VERY basic pinball with only a few features.
every light is going to need an IO pin*
every switch needs an IO pin*
every solenoid needs an IO pin
every flasher needs an IO pin
even a moderate pinball has 120 to 150 IO going on... and even that's with multiplexing all the lights and switches.
*(a 8x8 switch matrix and a 8x8 or even an 8x16 lamp matrix is often used to reduce IO requirements) with a dedicated switch set for starting and flippers and dedicated IO for all solenoids
you are looking at something more like an arduino mega or some kind of GPIO expander for a PI at the very least to have enough
you are not going to be able to power any lamps or solenoids directly. you are going to have to build fet driver boards to run them.
in all modern pins, the switches only feed back to the CPU board and the CPU board sends the enable signal to the FET of the appropriate solenoid to trigger it. no high voltage switching is done. it's all done in programming.
you'll also have to program in PWM if you need to keep a solenoid on more than 250ms (such as a gate or flipper.) they cannot be driven full voltage 100% duty cycle... they will fry in a second or 2.
>48v power supply
typically the only solenoids that require this high voltage is flipper and poppers. all the others like slings, VUKs, Flashers all run ~24ish volts. so you'll need to either account for that in your driver/PWM programming or have a dual voltage supply (or a buck converter capable of several amps capacity)