This is a somewhat complex question to answer because like many things it really depends on the circumstances of the project, the level of control the contracted company has, whether the custom software has been managed by the contracted company for it's entire life cycle, the amount of "interference" by other people with access to the code base, the attitude of all of the people involved, complexity of the project and methodologies used... I really could go on.
All systems have a degree of technical debt. In some cases this may not be particularly noticeable due to diligent efforts on the part of developers working towards always maintaining a clean code base, however no system is perfect and a major redesign can make a seemingly innocent yet long standing issue become apparent. So how do contracted companies handle this?
In many cases they don't. Often software will be written by one firm, then modified by another, and it's not unusual to see the code base get really messed up as each company under contract works to a tight deadline and won't justify the time to keep the code clean (and sometimes barely tested) if it means they might risk missing a deadline.
In other cases, you find companies that not only manage their contracted project well, but also somehow find the time to leave the existing code base in a better state than they found it. They do this often with careful planning, identifying sources of technical debt - usually those which will impact new work the most - and they devise strategies to provide test cases and modifications that contribute to managing the technical debt and factor all of this into their project schedule.
Does being a custom software guarantee technical debt as opposed to writing a central product? The short answer is no, however it is likely that technical debt will accrue if it isn't actively dealt with. This is the same as with any other software project. If you control the project entirely throughout its life cycle, then you have a better opportunity to deal with technical debt. If not, then you will need to deal with technical debt that may have accrued from the code that the previous company left behind.
On the other hand, if your question were to ask if writing software regardless of your business model is a guarantee of technical debt. The answer would be Absolutely. The real question is how any company handles technical debt. Let it accrue and deal with it at a scheduled time, or manage a clean code base in an ongoing manner in order to pay off against technical debt as soon as possible? That answer comes down to a company's individual priorities, and whether the technical debt incurred is financially relevant.