This is hypothetical situation ..
If the "ground pin" is floating you wouldn't call it ground ..
In this case it is an isolated "system" and there is no discharge path to enywhere ..
"System" will be charged and will remain in this condition till a discharge path is created, somehow ..
ESD is tested as pinX to pinY while all others are floating. That said there is the same structure on "the other side" which allows you to have "conductive" path and dissipate ESD pulse.
Also you have to remember that in case of ESD you are usually breaking through the junctions otherwise the ESD protection would mess up the circuit.