Is there a way I can encourage them to stay and be happy without overstepping my role as their boss?
A: When people compare the only too familiar warts-and-all jobs they already have with a notional future career constructed of 100% dream and 0% experience, it's hardly surprising that the jobs they already have seldom shine the more brightly. But however true that might be, you can't responsibly go round putting the frights on your people as a way of stopping them leaving you. In fact, you can't responsibly exert any sort of pressure on them to stay unless you're pretty certain that this would be at least as much in their interest as in yours.
There are two lines of action that you might like to explore. First (which we should all be doing anyway), consciously work out how to make their present jobs more rewarding: by trusting them more; by trusting them over longer periods of unsupervised time; by giving them their own self-contained project that they can feel parental responsibility for; by offering them training. I've left out money here because to someone who's genuinely longing for a more satisfying working life, more cash may dull the desire to move for a month or so, but then quickly become resented as another pair of manacles.
And, second, invite them to be open about their alternative dreams. Encourage them to explore those dreams realistically. See if the one who left you to re-train as a teacher would be willing to come back in for an evening and tell you all what it's really like. (No briefing from you, please; they'd soon see through you. He must tell it as it is.)
If you're concerned about over-stepping your role as a boss, hang on to this simple principle. They must have experienced the best of what you can offer them and they must have learnt the hard truth about the alternatives. That way, the choice becomes a fair one. You'll lose some and you'll keep some; but the ones who choose to stay will never be able to accuse you of having misled them. And some of those who go will want to come back.