There's no such thing as 100% quality in engineering. Never has been, never will be. Engineering is about delivering requirements, on-time, and on-budget. Trying to deliver more than the requirements either impacts budget or it impacts delivery time, every time, and the requirements are poorly defined to begin with.
The way you swim against this tide isn't by shaking your head at the idiocy of whoever you inherited the code from - it's by setting a positive example for your teammates, mentoring them, helping them grow, trying to raise the bar a little bit on every code review before everyone's patience runs out and you have to merge in what you got. Help everybody make the best of the time they get to put into the project, instead of living in some fantasy land where you can polish forever and never deliver.