I'm on the far side of the "husband hated his profession, needed to find himself" journey, so thought I'd chime in with my experience. I married a just-starting-out attorney, but today he's six novels into his scifi writing career. So, big swing, and it took years since there was a second non-starter career in between. I can't tell from the original post, and your husband may not know, if his career switch is "different kind of programmer" or "different kind of life." I suspect the possibility of the latter scares you more than the former?
There's no easy answer. Yes, my early retirement is delayed a couple years due to his new trajectory. But, it was also delayed by a couple years by my own bone-headed financial decisions of the past. Today I count them the same, lessons of life and all that. At the time, what I knew was that my husband was miserable, and we could live on my salary while he figured out a different path. At the time it helped he had a second career target (which involved an extra year of schooling), but like I said that didn't work out (job market, but also I truly believe he wouldn't have been happy then either). It may happen that way, and yeah, in the middle there I grew more concerned. But, now on the other side, I wouldn't change a thing. He's found his calling. Sometimes I still wish we had the salary of his that didn't happen, because who wouldn't, and I'd be done. But we're still better off the way it worked out if you prioritize happiness over the earliest retirement possible.