An anecdote: I previously left a job to pursue what I thought would be a great opportunity to work with a “modern” and fun technology stack. However, my new manager turned out to be a totally manipulative jerk and my coworkers were rude and uncaring. I lasted about 9 months there (enduring stress and panic attacks like I’d never dealt with) before I reached out to my old boss and asked for my old job back, which is where I’ve been for the last 4 years and I’m very happy I made that decision.
So even if the stack is terrible, think about how other aspects of the job impact your mental health and stress levels. Can you live with a terrible stack (or maybe even think about ways to improve it) while working with good people? Does your compensation cover any downsides to working with that stack?
If you feel you’re underpaid, can’t stand the technology, and the relationships with your coworkers don’t balance either of those aspects out, then I think it’s time to pursue something else. But be warned that the grass isn’t always greener on the other side.