1. The game minus the educational part should still be a solid game.
Imagine if I took Oregon Trail, but the game was about a colony on another planet running low on a vital resource on the other side of the planet. You choose your profession which determined starting stats, abilities, etc, and packed up a vehicle to drive to the other side... in other words, gameplay exactly the same as OT, but different setting and everything renamed. What's left is a sim with a survival goal, and a strong focus on resource management and random events. It would work just fine as a game on its own.
What if Number Munchers used colored dots on the squares instead of math problems, with each level displaying a list of colors you could or couldn't eat? It'd still be a game about choosing targets carefully and quickly while dodging various monster types.
If the player can't enjoy the game AS A GAME, then no one will stick with it long enough to actually learn anything.
2. Learning should be part of the game, not hastily tacked on.
Sure, you're looking up geography info in Carmen Sandiego, but what you're really doing as a player is following a trail of clues. In time, you'll actually learn stuff about various countries simply because it's part of the game.
There's a flash game called Super Energy Apocalypse. It's an defense RTS with zombies - they attack every night, and you build towers to gun them down. Of course, your base needs power to operate, and like many RTSes, you get this by building power plants. However, instead of just the generic plant, it has various types of actual power plants. For instance, you can build solar panels pretty cheaply, but they don't function at night. This can help you supply research operations during the day and store some energy, but try to rely fully on it and your base runs out of power at night you can get eaten by zombies. Oil plants are extremely reliable, but they pollute heavily, and that makes the zombies stronger. Etc. You have to come up with a power generation scheme that works - and true to life, you can't avoid polluting entirely on many maps, so you have to try to minimize it instead. Result: The player actually walks away with a decent understanding of alternative power sources and their strengths and weaknesses... but he's not taking a class, he's just figuring out how to kill zombies more efficiently. :)
There was a game where you run a lemonade stand and try to make as much money as possible in 30 days. The game is designed to teach you the basics of business - supply and demand, reacting to changing market conditions, long term planning to capitalize on unplanned good conditions and survive unplanned bad ones, etc. You'll never see any of that terminology though - you're just running your stand, making more stuff on hotter days, buying materials when prices are low, being wary of the occasional thunderstorm making you sell nothing, etc. You just try to figure out a strategy to land on a high score list, but ultimately, you're picking up the basics of business in the process.
3. The game needs replay value. Oregon trail has you trying out different professions and starting conditions, Carmen Sandiego has you working up the ranks of a detective agency, etc. This in turn means the player keeps coming back and getting more knowledge (Carmen Sandiego) or further improving a skill (Word/Number Munchers).
4. There needs to be an actual challenge. The crook can get away (Carmen Sandiego), you get eaten (Number Munchers), your base is overrun by zombies (Super Energy Apocalypse). To move on in the game, you have to actually learn something AND actually get better at the game.
5. At ALL times, it plays like a game, not a class. The lesson MUST be part of the game, forcing a player to read stuff that he isn't going to use IN the game results in skipped text or the player simply walking away.