To get back to what you’re asking, however, it depends on your local job market. In my area 95% of all back-end development is done in Java, C# or PHP and there are almost no web-development jobs that doesn’t require you to know one of those languages.
In other areas it might be Ruby or Django, so the best way to answer your question is frankly to look at the job listings for the jobs you’d like to take.
Corporate America has a gigantic investment in Java technology and while some of it is legacy stuff, even those companies still need new products and that work is also done in Java.
Java is the tech stack that companies who's core business IS NOT software are using. In my opinion its absolutely worth learning ( if you already know PHP, Java wont be much of a stretch for you - enjoy having a dedicated Collections lib! ).
Java is not broken so nobody is in a hurry to fix it, save for startups enamored with Node in the last several years. HN can be kind of an echo chamber at times but I promise you companies are not interested in walking away from their Java investment because Rust/Go/Python etc.
Java is a close 2nd behind Python here: https://spectrum.ieee.org/computing/software/the-top-program...
Even with Java 8, you get streams, lambdas and powerful Collection classes.
Personally, I've worked on sizable projects involving Java and have been amazed by it's performance and versatality. It's a construct that might go out of fashion for a while but will remain the backbone of most companies out there. My personal take is that Java is evoling at a rapid pace and this will only do good to the language.
If you value working with cutting edge technology there are new and interesting Java platforms, but you would undoubtedly be better off learning something more modern.
https://www.theserverside.com/opinion/Microsoft-vs-IBM-A-maj...
IBM is pushing java away while Microsoft is welcoming its community with open arm. Not sure what is Microsoft planning for it though.
At least in NorthEast, I get bombarded with lot of emails from recruiter with Java, C#, SQL, Oracle etc.
The U.S "startup scene" appears to be somewhat of a monoculture, following whatever is the latest coolest thing that they've heard of, but it's not representative of the ecosystem at large.
TL;DR yes there's a lot of well paid work in Java, it's "uncool" because of asshat developers like that go "oh java, ewww" on the internet.