I would rank program B over program A easily. I want to be happier, period. I've given up enough already; I want to live somewhere that's a good match for my interests. It wouldn't even be close for me.
But you want to start a family, and that throws everything upside down imo. How much closer is program A to your family than program B? Family = free childcare, and I don't know whether your SO is going to be working as well, but even if your SO is planning to be a stay at home mom/dad, even stay at home parents need breaks sometimes.
If you are sure you want to start a family in residency, I'd give up some personal happiness to be closer to free childcare.