That looks over-complex, and I doubt there is any need for a SSR.
Lets restate the problem:
- There are two 12V sources, 12IN and 12PWR. 12IN may be on or off.
- Power for the MCU shall be drawn from 12PWR only.
- Power to the MCU shall switch on when 12IN switches on, and shall remain on till the MCU commands it off.
- The MCU uses 3.3V logic levels.
To avoid confusion I've renamed the permanent 12V supply 12PWRThe first thing to do is to determine if the buck regulator's enable pin can be used to switch power to the MCU. This depends on whether there are any other 12V devices that need power switched together with the MCU and if the buck regulator's quiescent current when shut down is acceptable. If the regulator enable can be used, use it! If not, you probably need a high side P-MOSFET with its gate pulled up via a high value resistor to 12PWR, rather than a SSR, which invariably require more control power than a bare MOSFET.
Next you need to decide if 12IN shall be edge triggered (MCU can switch off while 12IN remains on, 12IN must go low to high to switch on) or level triggered (if 12IN is high it overrides switch off signal from MCU).
Next you need to decide whether or not you need to optoisolate 12IN. If it shares a common ground with 12PWR, the answer is almost certainly not.
For the simplest case of a P-MOSFET or an active low buck enable and level triggered, it could be as simple as a transistor controlled by 12IN pulling down the gate or enable, to initially apply power to the MCU with another transistor in parallel with it controlled by the MCU to hold the power on until it decides to remove it.
An active high enable will need a small signal P-MOSFET to pull it high, when the gate is pulled low. Edge triggering will probably need a capacitor between 12IN and the transistor it controls, so 12IN cant hold the transistor on. You cant simply use the power state to gate 12IN, as immediately after switch-off that will let a still-high VIN retrigger the circuit
Many soft-latching power control circuits have previously been discussed here. If you refine your requirements we can probably point you at a suitable one.