If the estate doesn’t have enough money to pay all the bills, the first thing to remember is the personal representative and family do not have to pay those bills from their own funds.
The decedent’s estate is liable for the debts of the decedent and creditors cannot collect more than the decedent owned. In such cases, there is a law that prioritizes the order in which creditors get paid. Creditors are put into categories (secured creditors, costs of administering the estate, funeral expenses, medical bills, wages owing, taxes, judgments, and other general debts) and are to be paid in a particular order.
If there is not enough money to pay all the creditors in a given class (such as medical bills) then the creditors in that category are paid a pro rata share of what they are owed based upon what all creditors in that class are owed. When the money of the estate runs out, no other creditors get paid.