This is all assuming a 5V supply and schmitt trigger inputs for the PWM and square waves
1 - 12V PWM, divide down by ~3 with a resistor divider (22K high, 10K low) then place a 4.7V TVS diode across the center point and ground to protect it, (assuming 5V supply) this you then feed into your first input, and is nice and safe for the outside world
2- Buffer with an op amp 1-1, with a 10K or higher value on its input and a 4.7V TVS diode (to ground) between the resistor and op amp input, you could even use said op amp to increase the gain of the signal if you want, but pick a rail to rail type, (includes lower voltage rail is a must)
3. Square 3V pulse, as long as you are confident it is 3V, then a 10K resistor and a 4.7V TVS diode to ground will be all the protection you need
4. 8V Square wave, divide it by 2 with a resistor divider (10K high, 10K low), and a 4.7V TVS diode between ground and the center point, this is your 4th input,