Can I use FET input capacitance to store a charge for some time?
Why don't you just forget the fet and charge a 100 nF capacitor up? It seems that M1 is bringing nothing to the party but complication. Once charged via the diode, it will hold that charge for long enough to read then, you switch the GPIO to an output and discharge it ready for next time. Why all the complexity and uncertainty of the fet?

If you are worried about the cap charging to 5 volts and hurting the lower voltage GPIO then use a charge potential divider before the diode and maybe a 1 kohm in series to the GPIO line.