First of all, it is the responsibility of the intermediary company. As the middleman, the intermediary company should know the specific details of selling the house. If the intermediary company knows that you are unable to repay the remaining loan, but signs a clause that the remaining purchase price except the deposit must be paid to you on the day of transfer, then you can go to the intermediary and let them help you solve the problem. Because they caused this problem.
Secondly, you can look for a private loan from the person mentioned above
. Although there are certain risks and the interest will be higher than that of banks, this kind of loan requires you to provide an equal amount of collateral to the other party. But it can be considered a solution.