A more natural way to say it is that equality requires that the unit of length is the length of an arbitrary pendulum and the unit of time is the half-period of the same pendulum.
The pendulum is a device that relates pi to gravity.
The arbitrary length pendulum with a period of 2 seconds which is your unit of length, (or 1 Catholic meter) is much shorter on the moon.
In local Catholic meters gravity would be pi squared Catholic meters / second.
As it would on any planet.
Either way works to approximately pi. There is a particular length where it works out exactly to pi which is about 3.2 feet, or about 1 meter. My point was that equations like that remain true regardless of units.
The reason pi squared is approximately g is that the L required for a pendulum of 2 seconds period is approximately 1 meter.
g in imperial units is 32 after all. g has units; pi does not