If you stay just for the money, you will mentally and technology wise suffer in the long term as you loose your drive, motivation and willingness to keep improving your skills and capabilities in software engineering. You will soon find yourself not caring about the work at all (hard to get out of bed and go to work), will not find much to talk about with coworkers (conversations will get shorter and have less content, just smaller and smaller small talk) and worse you will no longer be getting anything out of being there, barely contribute and your growth as an engineer will stop.
One thing many people do not think about when just working for the golden parachute is how not being engaged, growing and having fun affects your overall mental health. Your mental health is the most important thing you can maintain, once that is gone, any money you had or have coming will be blown through trying to get your mental problems fixed in and out of different levels of professional help options. Plus, you will no longer be able to have fun outside of work because you would be too drained mentally to do anything else which will start to affect your after work social activities.
This will eventually take a toll on your physical health too, and may put you in a state to where you are just too tired to look for something new and just stay where you are for the next 30+ years where you are no longer growing and challenging yourself.
From those above situations are from personal experience with previous/current coworkers, friends and family. The bulk of people that just stayed where they were and did not look for more fun and engaging work opportunities or start their own business to have more control of their software engineering physically look horrible. To those outside (friends, family, coworkers) you will eventually sound like a broken record of failed I want or should do x,y,z instead of someone that tried to do something new to better themselves work wise to improve.
Just remember if you find yourself asking yourself that same question over and over again, but are actually doing good at the job it is normally just a case of not being challenged enough at work and it is no longer fun and time to upgrade to a newer more challenging job.