Medical care for the child won't be delayed -- the child and a guardian will be debarked to receive medical care on land; otherwise they continue to incur further expense onboard. The cruiseline won't hold the full next cruise from going, and they aren't going to keep the rest of this family onboard for that. Assuming there are 2 parents (or 2 adults) with this party, one may be delayed debarkation until the onboard bill can be settled, or some sort of legal financial agreement is signed.
It's a horrible situation. But I can see both sides -- the cruiseline wanted to debark the family in port earlier, and the family opted (for logical reasons) to remain onboard and run up the medical expenses onboard. They actually were fortunate the cruiseline allowed that and had enough resources to continue treating the child for an extended period of time. Medical resources on a ship are finite and at some point the family could have been put off the ship to receive medical care, regardless of passport. It was a no-win for the family and I do understand why they opted to remain onboard.
OP - thank you for the reminder that not only are passports important, but having financial means to cover unexpected expenses is just as important. Insurance rarely covers the cost up front.