I would have thought https://adonisjs.com/ was the equivalent? I've not used next.js for a few years but it doesn't seem to have an answer for anything on the back-end except rendering. That only covers a tiny part of what frameworks like Spring or ASP.NET offer.
The mix of React components that can also be rendered server side (JSP tag libraries, Razor View Components), middleware (servlets, middleware), API routes (controllers).