That the old gods of Hammerstein! (and My-Stara) are exiled on the Moon is an idea that draws on a number of sources. Of course, the Moon has been associated with one god or another, or with the supernatural, in most human cultures. That something lives on the Moon isn't a particularly Modern myth either; Lucian of Samosata, in the second century AD, wrote a story of Ulysses' journey to the Moon. Flying boats, eh? I told you that they were cool.
Mystara has its own Moon dwellers, the samurai cats of Myoshima. Not the Samurai Pizza Cats (my wife refused to believe such a thing ever existed, until I showed her the YouTube video [warning: awaful theme tune]). But the real superhumans on the Moon that I'm referencing are these:
Kirby also drew The Mighty Thor (and the rest of the Asgardians), and characters such as Hercules also find a home in the Marvel Universe, and so the idea that the once Gods of the world of Hammerstein! exiled on the Moon is meant to evoke these kind of characters. Superhumans, immortals (some of THE Immortals of Mystara, perhaps), but diminished greatly since the era in which they made the world from clay, now trapped in their Olympian domain. Some still worship them, for sure (some of the Vikings of the Northern Reaches are confirmed Lunatics), but the main religious focus in the Modern Age is the Church of Humanity, and its myriad saintly cults.
P.S. My vision of extra-planar travel has always been VERY Kirby...