What's typically referred to as technical debt actually behaves more like an unhedged call option than financial debt. Because of the uncertainty around the value of these risks, teams should be prepared to pay a premium for complications created by spaghetti code. On the other hand, if this code is scrapped in the future, the company will benefit from not having devoted energy to polish it.
Determining the right amount of debt for an organization is hard. With financial debt, government provides incentives with tax shields and organizations can see amplified returns through leverage. With technical issues, it's similarly beneficial to take on future liabilities to facilitate faster growth.
In addition to talking about technical debt, companies should talk about their "technical balance sheets". These should include investments in the future (e.g. developing libraries / frameworks), which behave like capital expenditures.