Returning to the possibility that the shock was received from the switch mounting screws, which indicates that the CPC (Earth) conductor of the circuit is not earthed, I was thinking about the severity of the shock received. The most likely cause in that case would seem to me to be loss of connectivity at the consumer unit, rather than a local problem to the bathroom light.
If the CPC is disconnected locally it will float, but absent another fault would not collect enough leakage current from the nearby cables to give a heavy shock. To do that it would likely have been connected to the earth bar in the CU, while the CU was disconnected from main earth and any bonding due to an intermittent connection. Just possibly, loss of connectivity between all or most of the lighting circuit CPC and CU earth bar (which would leave the entire circuit's capacitive leakage accessible at all points) would be enough to deliver a heavy shock.
The above scenarios of intermittent earth connections should be fairly easy to locate by inspection and testing, unless one is very unlucky and there is a concealed intermittent e.g. where a cable is partially cut through, that is at the moment making very good contact and not detectable by unusually high resistance.