I was expecting this answer but I liked to hear it from you first, so that I can be sure I understood well your circuit.
Let us see from where this offset comes?
MCU pin is high:
In this state, we like the output voltage be at ground (0V). But to get it, the MCU supply voltage should be equal to or higher than the PMOS source voltage. Only if Vgs=0 (or positive), Id=0 (hence Vd=Vout=0 as well).
But in our actual circuit, the high state of the MCU pin is only 3.3V which means Vgs=3.3-5 = -1.7V hence, for most PMOS, the P channel starts to conduct and Ic is no more zero so we get an undesirable positive volt at Vd (Vout).
Before going on, may I ask:
Is it important to you to keep the two supplies be different for the MCU and PMOS?
In case they can be made equal, which one you prefer 3.3V or 5V?
The next solution will depend on your answer (no matter what will be).
Kerim