My question is has there ever been a comic where Superman tells the public about his weakness/vulnerability to magic, and if he has, what comic issue is it? I have looked through some old Silver Age Superman comics, but I haven't found any issue where Superman reveals this weakness to the public (but I did find an instance where he revealed how he was weak to Kryptonite, so there is precedent for Superman telling the public what hurts him).
Well yes, once (that I could find).
NOTE: Since you say "public" and not specifically "human public", it could by anyone, even alien. However this answer would be invalid if you're speaking about specifically human populous.
In Superman # 40 (2016), Superman and his son Jon Kent go to the planet Galymayne to save the native population from a mass extinction. When confronted by the natives, Superman does reveal (to the natives) about his vulnerability to Kryptonite, Red Sun and, you guessed it, Magic (see image below).
Answer: Superman is as vulnerable to magic as all non-magical entities; as this is universally true, it's not something Superman would need to disclose.
Explanation: The question assumes there are people not vulnerable to magic.
Consider the implausibility of the contrapositive: What would it take or mean for biologically-gifted science-based powers to grant immunity to SELECT magic?
Because we aren't describing an allergy, right? It isn't like if Superman is merely in the presence of magical beings, entities, or objects, he suddenly feels weak and vulnerable, right? In relatively recent continuity, Superman was romantically involved with the magically infused-and-empowered Wonder Woman... did his face puff up when they kiss or go unconscious when they embrace? Of course not!
Not to mention all the beneficial or allied spells meant to protect, buffs, or buoy Superman if cast by Dr. Fate, Zatanna, or simply stumbled upon pre-existing passive spells. When magic is cast to teleport, transport, or shield... it's not like Superman explodes on contact with the portal, is somehow unmovable by allied transport spells, or starts to rot away under a magic shield.
So it's clear that the interaction of Superman's powers with magic- if any- can discriminate between good and bad, hostile and friendly magic.
So here's the key question: Does it make more sense for that discrimination to come from Superman's evolutionary, biological, science-based powers... somehow possessing the self-aware ability to distinguish between what magic to let in and what magic to keep out for ALL schools of magic no matter their source, origin, or mechanism ... OR ... isn't it more likely that magic- whatever its source- operates on all non-magical mundane things to the same degree?
The latter is the more logical conclusion and, if that's the case, the there's no need to be informed of Superman's vulnerability since you could deduce he'd be as vulnerable to magic as any other non-magical entity.
Indeed, this is exactly how my expert witness frames the issue... Kurt Busiek, highly acclaimed superhero comic book writer having won the Harvey Award for best writer in 1998 and the Eisner Award for best writer in 1999, along with several other Harvey, Eisner, and other Awards for his writing. He's probably best know for Marvels with Alex Ross and Astro City. But in Superman circles he's known for writing the must-read, Superman: Secret Identity (published in 2004) and his runs on Action Comics and Superman between 2005 and 2011. Busiek also wrote the Avengers from 1998 to 2004; Concluding with the historic JLA / Avengers cross-publisher cross-over where Superman prevails over Thor and his magical hammer.
In a CBR forum post, here's what Busiek had to say on Superman and magic:
Superman is not allergic to magic; it doesn't affect him like Kryptonite. He is simply vulnerable to it the way everyone else is. So a "turn into a bunny" spell would turn Superman into a bunny. It would also turn the Hulk or Gladiator into a bunny. The reason Superman is described as vulnerable to magic is not because he's more vulnerable to it than anyone else, but because he's invulnerable to just about everything else. (Parenthetically,) [Or was, pre-Crisis, when magic, red sun rays and Kryptonite were about it.] Magic doesn't affect him differently from the way it affects other people -- it affects him the same way it does other people. He has no immunity to it. And neither do the Hulk and Gladiator. And no, Thor's hammer doesn't make him stronger, and there are no spells on it that make it hit hard. There are a bunch of magic spells on it, but they've been enumerated, and none of them make it hit harder. The spells would work on Superman, to the extent that they'd work on anyone -- but they'd do what the spells are enchanted to do. They wouldn't do more to Superman than they do to the Hulk or Gladiator, because those two characters are no less vulnerable to magic than Superman.
So aside from Busiek's accolades and accreditations, he's a man who's written Thor for six years as an Avenger and thus not inclined to an anti-Thor bias in his analysis.
I'm not arguing this is how Superman has been universally handled by creators. I'm well aware of precedents and products to the contrary, for example, Scott Snyder's Batman Issue 20. Rather, this is an argument for why the "vulnerable but not weak to magic" viewpoint is perhaps more logically sound and consistent than proposing Superman is especially weak to magic. This seems an appropriate way to resolve differing precedent, by seeing which one is more reasonable.
The problem with magic as a weakness is that it requires that either Superman's powers or all of magic have special sensitivity to the other. Which on its face may seem OK to give Superman a weakness, but falls apart on examination. Let me give you an example. Suppose, we were to strike Superman with Harry Potter's broom. Intuitively, we know that it is enchanted for flight, with no special striking or offensive characteristics.
Under the allergy theory, striking Superman with Harry Potter's broom would not only hurt him as much as a normal person, but more than a normal person would be harmed if struck by any broom, simply because the broom itself is magical.
This creates our above quandary: How does Superman's non-mystical scientifically-based powers know that the broom is magical? How do his powers know either to stand down and step out of the way, ceasing to protect Superman, or affirmatively harm him more than any other person? Obviously, they don't and they can't. That would imbue Superman's powers with sentience and magic detection, tying his science-based powers to the irrational force of magic.
Obviously, it is ridiculous to place the burden on his powers, but what's the alternative if Kryptonians are specifically weak to magic?
The alternative is that ALL magic is unified, fundamentally scientifically reliable in nature and interacts with Kryptonian powers in a uniform way... no matter how irrelevant the underlying magic is to the harm! That every spell cast has a rider attached in the fine print saying, "and this will weaken and hurt Superman."
So when enchanting Harry's broom, under their breath they mutter, "and this will hurt Superman" or that all magic throughout the multiverse has a consistent scientific interaction with Kryptonian powers.
Of course, that's absurd!