I have been in software development for 20 years, I do the same thing, solve the same problems every day - and I find it fascinating, I am more of a passionate bastard than ever! :-)
I am programming, I translate a set of requests and ideas to working systems in different platforms, as good as I can. The challenge is not WHAT you do, but HOW you do it. I constantly search for the best solution, the best internal structure that I can achieve. I have searched for the answer to the most important question (at least for me) all along these years: what is programming? The answer is in writing programs, and it always meant building frameworks, toolkits, like a transparent persistence layer, GUI data binding, etc.
You have not wasted these years, you have gained experience and routine in doing your job well. What is your problem anyway? What a painter, a scientist, a carpenter or farmer does? The same thing all days - but if we really like what we do, we do it each day a bit better, and this makes us happy. This is called LIFE.
If you don't like what you do, weight your knowledge and motivations, find a position in your current or another company that better fits your needs. Do what you like AND you are good at, as long as you can. For motivation, see the Time Management lecture from Randy Pausch.