This is a really broad question, and there are many things to consider. I commend you for narrowing it down to software development (the discussion would be more time consuming if we compared becoming an artist or an engineer).
The things I would consider in your place:
1-Is your current pay-range acceptable for your quality of life standards and retirement plans? If you cannot afford a life you are satisfied with, then pay range grows in importance. If you can afford the lifestyle but you cannot save enough to reach financial independence on a reasonable amount of time (and this depends heavily on your age), then salary is a big concern. You may not be able to find a job when you are 60, so make realistic plans for retirement and execute them.
2-Do you intend to reach a management position? Managers in software should also know how to code, but if you are a manager maybe you won't need to elarlearn a new framework just to meet a requirement if someone on your team doescan handle the issue. Maybe part of the job you don't like can be delegated. You'll have other concerns too, and pressure may much higher. You'll also be expected to deal a lot more with people. However, your salary should go up and the job market may remain more accessible as you age. The thing to consider is: Which workplace option would grant you better chances of developing the skills to work as a manager and which workplace youwould actually give you this role? It goes on a case-by-case basis.
3-How much you dislike or love less the higher paid job? A bit of stress is normal in any workplace. Not waking up excited to go to work is also usual. Depression isn't. Stress-induced health problems also cross the line. If every day for months on you think about quitting or getting a new job it is likely time to leave. Switching to a job because you believe it's super exciting may be good over the short term but in the long run the excitement may go away. The point being: Stay away from toxic jobs, but avoid putting too much faith on a job being extremely pleasant on a daily basis.