An education in science generally, including its history.
Speaking as an atheist brought up in a household of no significant religious zeal, there's a whole lot of stuff in the Gospels (I'd leave out the rest of the Bible) and Buddhism, if you can avoid catching religion from them. So, not for children, and not for all adults.
The self-help literature is vast enough to find in it what one looks for.
But there are two sorts of cynicism and idealism not being distinguished in these recent postings: about how the world is, and about what can be done about it. Concerning the first, the proper position for a rationalist is neither cynicism nor idealism, but to strive to discover how the world is, however that is. For example, to acquire the belief that all politicians are crooks if and only if, in fact, all politicians are crooks.
The second similarly, except that what can be done can often only be discovered by doing it. Which makes it not similar, but completely different. The cynic about what can be done has decided to fail and grants his own wish immediately; the idealist has decided not to and will have to expend some sweat, and may still fail. How does a rationalist decide?
Saith Robin in "Seeking a Cynic's Library":
Books on education, medicine, government, charity, religion, technology, travel, relationships, etc. mostly present relatively idealistic views, though of course no view is entirely one way or the other. So one reason the young tend to be idealistic is that most reading material they can easily find and understand is idealistic.
My impression of this differs somewhat from Robin's (what a surprise).
I think that what we see in most books of the class Robin describes, are official views. These official views may leave out many unpleasant elements of the story. But because officialism also tries to signal authority and maturity, it's hardly likely to permit itself any real hope or enthusiasm. Perhaps an obligatory if formal nod in the direction of some popular good cause, because this is expected of officialdom. But this is hardly an idealistic voice.
What does a full-blown nonfictional idealism look like? Some examples that I remember from my own youth:
Supposing you wanted your child to grow up an idealist - what nonfiction books like these could you find to give them? I don't find it easy to think of many - most nonfiction books are not like this.
On the other hand, I suspect that idealistic fiction aimed specifically at children is a far greater cultural force than anything they pick up from their school textbooks. Textbooks are marketed to adult textbook-selectors; juvenile fiction and children's television are actually aimed at children.
Of course this just implies a chicken-and-egg problem; why do children enjoy idealism more than cynicism? On this score I would suggest that children in the hunter-gatherer EEA have no chance of successful rebellion, and so haven't yet developed certain emotions that will come into play after puberty. But children will be actively engaged in absorbing tribal mores during their maturation, and may benefit from signaling such absorption.
Teenagers who act as if they could still get together with their friends and split off to form their own tribe, enjoy cynicism aimed at current authority figures and idealism aimed at their new tribe.
When such forces have petered out, I suggest we are left with a mostly socially-determined adult equilibrium: idealism about some distant subjects is used to signal virtue, cynicism about other distant subjects is used to signal sophistication.