I know it doesn't seem like it to folks who haven't been around for long, but AI and ML is a fad, currently at Peak Hype. There will continue to be AI researchers in a decade, but they will be the people who are in it for the long term. The magpies who are currently swarming into the field will flitter away when the Next Big Thing comes along.
I point this out only because the OP specifically mentions how the treadmill of constant learning leaves you in place in this industry...and this is a great example of how it happens. If you spend your life chasing every five-year fad cycle in tech, hoping for continued relevance, you'll burn out. Moreover, you'll always be at a competitive disadvantage to the 20-something new grad who knows the new shiny as well as you do, and works for praise and pizza.
If you want to specialize, then really specialize. But be prepared to devote a big chunk of your life to it.
What other domains do you recommend instead?
As for your other question: no, it isn't just AI. Right now, the "javascript engineer", "mobile developer" and "data scientist" are all magical creatures of the Unicorn Land. I can't predict what comes next, but I can confidently predict that none of these things will be as hot in a decade, because they're all just the latest variations on broader themes.
That said, there are often actual disciplines beneath these trends. For example, "data science" is practically the definition of a magpie fad: science has always depended upon data, so putting "data" in front of the term is an indication of (fairly thoughtless) trend-chasing. But actuaries, analysts, scientists and statisticians have been around for decades, and will continue to exist long after the last 20-something "senior data scientist" has closed his Jupyter notebook for good. Specialize in those things, instead, and call yourself whatever goofy thing you need to say on a resume to get hired.
Any reasonably intelligent kid can pick up a data analysis tool in months, but it still takes decades for that kid to become an expert statistician. Prefer the latter.
It's the difference between being a middle manager at a tech company and being, say, Rob Pike or Jeff Dean. (Maybe that bar is set a bit too high, but hopefully you get the idea.)
An analyst with a balanced combination of programming and stats skills and business domain knowledge will always, always be able to find work, regardless of whatever the latest fad is.