Corrected entry: Trelane says he studied Earth images that travelled to him at light speed, and earlier they establish Gothos is 900 years from Earth. But Trelane references Napoleon and Hamilton, who weren't around until 1800 or so. That would put this episode in 2700, but the original Trek episodes are set in the 2200's.
Corrected entry: At the end, Batman mentions "Aunt Harriet's home-cooked meals" to Robin while they're well within earshot of Riddler and his henchmen, who are all restrained, but not unconscious. That's dropping a pretty big clue to their secret identities - a mistake Batman would be much too smart to make. (00:22:00)
Correction: Mentioning Aunt Harriet's name would hardly be a clue to Batman's secret identity. First, she isn't even Batman/Bruce Wayne's aunt. Additionally, other non-relatives (like the Commissioner) call her Aunt Harriet. And, even though the audience can hear Batman, there's no reason to think the goons are in "ear-shot".
Correction: You assume that Trelane lived only on that planet. Rather, Trelane was a powerful energy-entity that did not actually live on the planet, he was just playing with it. Trelane's kind could go anywhere in the galaxy they wanted, at will. In fact, Trelane's parents merely allowed him to play with a whole planet to keep him occupied. As an energy-entity, Trelane had obviously observed Earth from much closer range, at some point, which is when he became fascinated with 18th Century Earth civilization and warfare. But, when the Enterprise encounters him, he's "playing" elsewhere in the galaxy, now 900 light years from Earth.
Charles Austin Miller