Dang, this is a tough one. These are two of the most preposterous episodes from a credibility standpoint, both of them going far beyond my willingness to suspend disbelief.
"Terratin" annoys me with its premise that the people are shrinking because their DNA is being wound tighter. That's so profoundly wrong. One, organic matter isn't made entirely of DNA. It's found only in the chromosomes. And two, the shape of the DNA molecule is important to its interaction with other enzymes, proteins, etc. Change its shape by winding it tighter, if such a thing were even doable, and its ability to transmit information through chemical reactions would be lost. The result would probably just be death, not shrinking.
As for "Magicks," it wasn't so bad at the time it was written, since the Hoylean continuous-creation cosmology that it's based on was still considered a viable alternative to Big-Bang cosmology at the time. But these days, it's been thoroughly debunked by astronomical observations, so the episode is as obsolete as a movie showing jungles and dinosaurs on Venus. And of course there's the continuity problem it shares with ST V, that travel to the center of the galaxy is portrayed as easy rather than requiring decades.
Aside from the science, I once would've said that I enjoyed "Magicks" more as a story. The continuous-creation nonsense aside, I don't have much problem with the idea of another universe whose physics allow what we'd consider magic. It was an intriguing and imaginative idea. But I've soured on the episode because of its treatment of the Salem witch trials. Those trials were a gross injustice arising from the profound misogyny of their society, and glossing them over as the result of actual supernatural phenomena is an irresponsible historical whitewash.
Though now that I think about it, I suppose you could say that "Magicks" merely uses a sci-fi allegory to make the same point -- that the trials were an injustice resulting from the Salemites' intolerance toward innocent defendants. A story like The Crucible, confronting the sexual politics that drove that injustice, wouldn't have played on Saturday morning, so maybe the allegorical approach was the best they could do to convey the message. Still, as a rule, I'm not comfortable with stories that gloss over the truth of historical injustices, because it sets a dangerous precedent.
Either way, I guess I have to conclude that for better or worse, "The Magicks of Megas-tu" is the more thought-provoking of the two. It actually has something to say, a classic Trekkian message of tolerance, even if the presentation could be considered a misfire. "Terratin" doesn't have much of a message beyond "Hey, we're a cartoon so we can draw our characters real small." Maybe there's a hint of a theme about how people who appear threatening can actually turn out to be well-intentioned and friendly once you get to know them, but that's the theme of maybe 75% of Filmation's entire canon, so it doesn't really stand out.
So I can't really pick which one I personally like more, but in terms of which episode has more substance, I have to go with "Magicks."