The problem may actually be at a higher level: with management and product owners concerned with deadlines as opposed to the developers themselves.
At my last place of employment, I worked on legacy code but was in contact with people developing brand new code using (supposedly) Agile and TDD.
Now TDD is supposed to be Red - Green - Refactor: write failing tests, do the minimum to pass the test, then rework the code to make it more maintainable while making sure it still passes the test.
But… progress was measured by how quickly user stories got implemented, i.e. how quickly new functionality got added. The thing about refactoring is it doesn’t add any new functionality. Yes, it is very important but it doesn’t have the same immediate impact as showing the product owner the new functionality or even the lines of test code to go with it.
As deadlines loomed closer, and overtime became standard, there was the incentive to skimp on the refactoring part. The more one does this, the more quickly one gets thru the user stories, which seemed to be what management cared about.
Now, this did lead to technical debt because on a number of occasions to get the next user story done it turned out to be necessary to go back and refactor - really rewrite - code for the previous bunch of user stories. Management became irate at this because from their point of view the user story in question did not look to be all that different from the previous ones so why was the estimate for it 10 times longer?
(There was an ugly game theory aspect to things as well. If you or your team were conscientious about refactoring that didn't prevent you from getting stuck cleaning up after another team that wasn't. Of course, that other team looked better because they got more user stories done in the same amount of time.)
My point here is perhaps TDD does not lead to technical debt if done properly. But for it to be done properly there must be genuine buy in from higher up.