by giving them freedom. in my experience, what makes a job suck isn't that the problem lacks "excitement", but that you aren't given the freedom to do a good job. you can take pride in work for even simple tasks,
if you own them. on the other hand, you can be in the most exciting field in the world, but have a crappy boss and a shit life.
and almost any technical job can become complex enough to be intellectually interesting, if you have the freedom to use tools to automate the boring bits. what kills is being forced to do tedious rote work because you are restricted in your process. working on a production line is boring; building a production line is fascinating. the line between the two is clear in factory, but not in software development.
"exciting" is for non-technical marketing people with an attention span of 2 seconds before they see the next shiny object. absorbing, empowering work hasn't got much to do with excitement. it's about expressing and developing something of your own. it doesn't have to be different, or exciting, or ground-breaking. it just has to be yours, to develop in the way you see fit, to meet the requirements you are given.
i didn't know this when i started; i imagine selling "exciting" work will get you people with little experience. but i'm wiser now.