I work for a large company that is very short-staffed right now. About 6 months ago the team my spouse had been working on was in desperate need of another employee. My project was ending and my spouse's manager was given my name as a potential employee but held off on bringing me onto the team for some time due to concerns about having me work with my spouse. Finally, he gave in and brought me onto the team because he didn't think he would get anyone else.
We had no idea how it would go, but didn't think we had a say in the matter and so we went ahead with what we were asked to do. It has caused major issues affecting our home life. Every time we are assigned to work on tasks together we find ourselves frustrated with each other, even though we are normally great at working with other coworkers. Even on days when we are not working directly with each other we feel burnt out by spending so much time in the same vicinity and by the end of the day don't want to be around each other.
Within probably 6 weeks I wrote an email to my manager telling him that working together in that way was negatively affecting us and expressing my wish to be moved to a different team. I was pulled into a meeting with him and with another manager. I realize now that they didn't want to lose me and pretended that there was no way for me to leave the team while asking me how they could improve the situation. Their thoughts are centered on how to finish the project in a timely manner and they were and still are not able to see the fact that it's quite possible that the best thing for me is to not be on that team anymore.
Now I find myself 6 months in and the only expert on a specific part of the project. They cannot afford to lose me even more. They have promised me that they would only need me for "a few more months" for too long and are now openly admitting that they want me to stay on the team through the next possibly 6 months. Meanwhile my stress at home caused by working with my spouse has never been worse. I dread having to work with him and it looks like we will only be working together even more in the future.
On top of that, the last time I brought up wanting to move to a different team my manager hinted that I would make life miserable for my spouse, making the rest of the team have to work holidays and weekends. This makes me genuinely nervous to leave. At this point, my marriage is more important to me than my job but I feel like I need to take action to protect both.
Is being forced to stay on the team with my spouse a valid HR concern? How do I gracefully yet firmly express that I need out of the situation, even if it means going over my manager's head? I want to do this in a way that maintains both of our reputations, but that is seeming difficult when I may feel forced to divulge how serious the challenges to our home life have become.
Edit: We are both engineers, each with roughly 5 years of experience.