We introduce a gauge-invariant model of planar, square molecules coupled to a quantized spatiallyvarying cavity electromagnetic vector potential Â(r). Specifically, we choose a temporally chiral cavity hosting a uniform magnetic field B, as this is the simplest instance in which a transverse spatially-varying Â(r) is at play. We show that when the molecules are in the Van Vleck paramagnetic regime, an equilibrium quantum phase transition to a photon condensate state occurs.