What does this company want? Money.
Why they hired you? To help them make money.
If you can align your interests (write better code) with their interests (make more money), you may have a chance to rewrite the code. :)
Prove them that refactoring the code can help you create more sites faster. With more sites in less time, they will make more money.