Seconded.
I have been at startups where it's a total mess that will never be cleaned, and I've been at startups where the code is always tip-top because everyone knows you get big B2B points for implementing their dream feature right after a regular "how are you liking our service" followup.
I haven't worked at mega-corps, but I've seen bits of code that is so much worse than imaginable that I expect there are places that scrape pretty far below the bottom of the barrel, but that might just be a volume issue (the worst 1% of code will be mostly mega-corp code because most of _all_ code is in mega-corps).
The idea here is that you do the best you can within the constraints, not that you use your start-uppishness as an excuse to be sloppy or to produce crap.
In fact, the majority of the real messes I see are not in start-ups but in more established companies where the original developers have long since moved on. Large codebases where very few people (if any!) have an idea of what is really going on.