That's what I used to think, that you can't make sense of the "Gothos" time references. But you can, if you realize that Starfleet officers are not always as smart as they think they are. Here's how I frame the explanation:
• Jaeger's hasty assessment of Trelane's period decor is influenced by knowing that we encountered Gothos 900 light years from Earth. Jaeger wouldn't know one century's decor from another; he simply jumps to conclusions and figures that the Earth period being imitated must line up with the distance in light years. But it doesn't.
• The planet Gothos is Trelane's toy. He flies it through space at will— it can even outrun and corner the Enterprise. Trelane can go anywhere he wants to. He probably studied the Earth up close at various times over the centuries, saw a crazy quilt of mixed period references, and then flew off to distant reaches of the galaxy.
Conclusion: Gothos just happened to be 900 light years from Earth when the Enterprise ran across it. That tells us nothing about what century Kirk is in, because Trelane flies that planet around at warp speed. Thus "The Squire of Gothos" presents no problem at all for dating the series.