I've owned several homes in different parts of the US, built at different times and a wide range of values and every time a chimney sweep, plumber or electrician comes in to do some work, they always point out something that was done very poorly. It has nothing to do with the task at hand and there's no way myself or anyone else would ever want them to rebuild it. It works. There's more good than bad.
Be careful in your judgement. As you grow as a programmer, you will be appalled at the code you previously wrote. I'm not defending it, but we rarely hear anyone take a new job and hold the existing code base in high-regard. I imagine the former developer went to another company and cursed their existing code as well.
There are two things you can look into to see what kind of a situation you're getting into (bad code may be the least of your problems and is probably a sympton of something worse)
The Interview Process If they don't make sure you can write code, there's no reason the previous hires did either. They're probably not paying attention to the production code either.
The Development Process Ask what you and everyone else are required to do. Testing, code review, automated builds, requirements gathering, planning, documentation, bug tracking can have big impacts on code quality in a project of significant size. Ask how they handle emergencies. As anyone had to work over-time to finish a project? Is scope-creep a problem (Of course it is, but do you admit it and have evidence you've avoided/limited it?).
Personal Taste It may not be so much a matter of bad code, but things just aren't done the way you prefer. I like working directly with users/owners instead of having everything go through a manager. I'd rather have to cleanup and work with a bad code base than an uncomfortable environment. To me this is the best chance there is to getting things right eventhough it may take a little longer.