Something funny is going on if there is a mortgage on a house your grandfather built rather than bought. A mortgage on empty land wouldn't be so much that it lasted "many many years". It sounds more like he took out a loan with the house as collateral.
You shouldn't have to pay the 40K all at once; you should be able to continue the current schedule of mortgage payments or get a new 40K loan. If among all of you you can't even make those payments, then you cannot afford the house. Don't forget that there will also be maintenance costs and taxes every year once you do own the house.
What will most likely happen is the estate will sell the house. All proceeds after paying off the 40K and your grandfather's other debts will be divided among the heirs.
the process when someone dies is to immediately contact an attorney and find out who is the executor of their will, and that person talks with the attorney and brings all the bills to court and the list of assets. Then the attorney and the judge sort this out and the judge puts out an order of what will be done. If your father says the house will be lost to the bank it probably means it will go to pay your grandfather's bills and not that you can pay to keep the home. Since it's your father who knows what's going on why not talk with your father and ask him to talk with the attorney and see what alternatives there are. If your grandfather built it many years ago then it would be costly to repair, to update things to code, to solve the settling of the house, etc. so it very well may be a good thing to give it up. Take your pictures of the house while you still have time.
In the US, the lenders are in many states required to try and work with the heirs to arrange some kind of financing to keep the home from being foreclosed on.
The executor has to talk to the lender.
Harsh reality time here. 10 heirs? You sell the house, or one of you buys out the other 9 (Which you say can't happen) and you are done with it.
10 people owing a house is a recipe for a disaster that will end with the house being lost anyway.
The house isn't a problem for any of the heirs; it's the estate's problem. If the estate does not have the cash to pay back the $40K, it will have to sell Gramps' assets to satisfy the debt. Those assets may include the house itself.
After all of Gramps'/the estate's debts are satisfied, the heirs get the balance.
Go talk to the public trustee (as a beneficiary you have a right to talk to them)
The 40k is largely irrelevent
Since nobody can raise a loan to pay the 40k the only way the house can be shared between 9 people is for it to be sold and the proceeds divided between the 9
(that means - the trustee will sell the house, pay off the 40k (cos the house is worth more than 40k) and divide whats left between the 9 of you
Since the trustee will advise the bank its going to be sold its very unlikely they will foreclose unless it takes a very long time to sell.
The bank does not take all of the house. It only takes the 40K to repay the mortgage and the rest goes into the estate for distribution to the heirs.
Mortuus est ergo tota anima in avia tua destoryed got a matre mea
If no one has the money then the house will be sold. The bank will take the 40K plus expenses and the siblings will get what is left.
You cannot afford the house, so you sell the house, pay off the mortgage and divide the rest.
Sell the house and divide up the profit.