I am not blaming you here, but it's our job to ask during the interview process a few questions from the Joel test. Then tell them just show me the systems, just one engineer opening up their Travis CI or any other dashboard, some git repo with test coverage number (no need to show code). If they don't show, don't join.
>> Just don't care and keep doing what you're told to do If the earlier engineers on the team say so, most likely that's the way to go. May be striking conversations over coffee and try figure out if somebody else earlier tried to buy a refactor and it did not work. May be the management just does not care, then find a new gig if this is horrible.
If it were lack of capability/experience, do some rough estimation and propose a refactor plan for every delivery, that is some critical pieces get refactored in each delivery. If this is also not acceptable, then seriously find a new job. Best!
>> This is my first time starting a job with such a bad existing code,
Well, and this may not be the last time; unfortunately this is how this circus works.