Yes, that is tricky as well. I feel like someone agreeing to be a surrogate should not also have to be at risk of paying large unexpected medical bills. I don't know how it's set up currently.
The impression I get is that the people using surrogates are not necessarily the same people trying to adopt, unless it's a baby. It seems there is demand for babies, but not older children. And even less demand if the child has health or behavioral issues.
I think the answer in at least some cases is providing better support to parents, ideally before children even need to be removed. But also after so that parents are able to get their children back.
Really I'd love it if healthcare was way less expensive. I'd also like it if we shifted to living in larger groups rather than nuclear families being the norm. Then parenting wouldn't be so all-consuming and people who wouldn't otherwise be in that role could help more significantly with raising children.