If you simply owe money to the bank and fail to repay it, it falls under the jurisdiction of civil law and does not require jail time. At most, you will have to pay all your property.
But if the situation you mentioned above exists in a state unit, although you do not need to go to jail if you do not repay the money you owe to the bank, this situation will generally be regarded as "corruption", "neglect of duty" and "misappropriation of public funds". If you are found guilty, you will go to jail.
The situation you mentioned in private companies is actually a matter of bank review. Generally speaking, if there is no mortgage of equal value, the bank will add a third-party guarantee with guarantee capacity. If these are not implemented and the loan is issued, it will depend on the situation:
If relevant personnel of the company engage in bribery, they can be prosecuted for bribery, which will lead to imprisonment.
Relevant personnel of the bank who fail to follow the regulations for approval will also be imprisoned if they cause heavy losses.
But in a word, simply owing money to the bank and not being able to repay it falls within the scope of civil law and does not require criminal liability. In layman's terms, you will not go to jail.