Suppose you find yourself stuck in a job that you are not passionate about but is unable to quit for a long period of time e.g. 10 years without incurring huge financial costs, how do you make things better?

Negotiate with the employer and strike a win- win deal. No employer wants a soulless employees. Everything can be negotiate.

I agree with Edwin, definitely speak to your employer first to see whether you can find a win-win situation e.g. different opportunities for you to grow/develop.

If it turns out fruitless - you should start looking for other opportunities that can ignite your passion even if you need to take a slight cut in salary - if you`re feeling like this after 10 years, you still have another 30 + years to go so might as well find something that makes you excited to wake up everyday