AI writes faster, so the rate it incurs tech debt is proportionally higher. However it's ability to have large context kept on memory compared to humans is also a key component fighting against it. These are occasionally forgotten when code quality of AI for large code bases are discussed. So Yes I think humans also build spaghetti, but as they write slower they get to the same place a lot later. However humans can't correct it, or can't correct it fast enough. AI can.
It does somewhat depend on the application size. Seems to me that for regular software projects (that aren't enterprise SaaS) a good programmer will create better software than Claude. Maybe the dehumanizing way to say it is that humans have more efficient/improved retrieval. The amount of time I see repeat code for no reason, or code/context that has been obviously missed is absurd.