If the PCs have the ability to know, but the players do not know and even cannot know to ask, then the DM should offer the information without prompting.
Combine the above with telling players anything that could screw them over at Char Gen, and a DM should be ok.
I think the first part is pretty close to the way I handle things when I'm behind the screen, but I'm a little hesitant about "ability to know."
Consider a spellcasting character who doesn't know any spells which invoke magical fire yet - no
burning hands, certainly no
fireball. I could see not informing the character that using a spell which creates magical flames attracts the attention of creatures from the Elemental Plane of Fire until such time as they learn the spell.
One could argue that a spellcaster's training prepares them in such a way that this is relatively common knowledge, but as a player I wouldn't presume this to be so - I don't think every magic-user need be a product of a a Hogwarts or Roke style magical education. This makes magic something to be explored as a feature of the setting.
Frex, if I was running a d20 game, then I might use something like, if the DC for a Knowledge (Arcane) check can be reached on a take 10, then it's common knowledge to someone with the skill, but for characters who know how to cast some form of magical fire, then they can effectively take 20 on the check to determine what is common knowledge.
As far as "screwing over" the players at chargen, if magic is meant to have hidden consequences as a
feature of the campaign, then a simple, "Spells may have additional effects in the game-world that aren't in the by-the-book descriptions," gives the players advance warning.