Not at all. I made a career of being a generalist, then freelancing, then I learned I have ADHD.
Makes sense to me now. Working on the same technology for more than a few months and I get terribly bored. So I keep learning new stuff and staying entertained and motivated. The more I learn, the more I am valuable to my clients.
Most companies don't need a hammer. They have all sorts of problems and need someone to fix them. One day it's the Ruby backend, the other it's the database server. How quickly can you learn, adapt and create value? And for that rare and very specific problem, you call the world-class specialist for two billable weeks. The remaining 50 weeks of the year, they need you and your expertise.
Don't forget that software engineering keeps becoming wider, more complicated and accelerating. You have to keep apace with it, or you'll find you're a fantastic expert at a JS library that nobody has been using for the past 5 years, which is archaeologic in software terms. It's exhausting, but if you stop staying abreast of technology, catching up becomes increasingly difficult.