J.S.
Until you are divorced all assets are marital, all debts are marital. If he gets the surgery you are on the hook for half the debt anyway so why is this your hill to die on. If you divorced right now he would get half that HSA balance. If you divorce after he has the surgery you would get half that cost and half the HSA.
Go forward with the divorce, put a reasonable period of time to refinance the home. Ours was 6 months because there was no reason a refinance would be difficult but there is no reason it has to be limited to 6 months, I have heard of terms as long as 5 years. There is no upside to delaying severing your assets just because the refinance may take longer than normal and until you do he can rack up all the bills he wants and you will be stuck with half. I am just saying this because right now you see that you are the bigger revenue generator, at some point he is going to figure out he can be the bigger bill generator. Divorce before he figures that out.
Some of the answers prompted me to say, my ex wanted to cut me off his insurance when we separated. He didn't want to pay a penny in support, nothing. The courts abused him because of this. They don't like when spouses try to remove the other from things they have always paid for. I am not saying that is the case here but in my case it made my ex seem petty and controlling to the judge. I was a stay at home mom so very different from this but my ex always carried the insurance so when he tried to remove me things got ugly.