It's a balance, but too many people don't even flag it to management because they're lazy and they write shit and ship it to get it off their own plate.
Now, if management says ship it anyway it's a balance of you as a developer making sure they understand they're throwing this technical debt on the credit card and it may (probably) need to be paid off later. If you fail to articulate the interest that'll be due later then you didn't do enough or management is bad.
You shouldt work unpaid to fix it, but sometimes you should just do it right even if it takes longer because it's how it should be done.
I do not like this prediction, because it seems like a plausible reality. Which would be awful.