I will admit to sometimes getting frustrated at work when someone doesn't want to work in a specific codebase because they think it has too many problems. George Bernard Shaw said, "If there were nothing wrong in the world, there wouldn't be anything for us to do." The systems that need the most work don't just validate the need for developers but are an opportunity to make major improvements.
I had a friend in grad school who went to work fixing and upgrading Cobol applications at a large financial company. Much of the software had no major maintenance in years. He loved it. He said that everywhere he looked he found things to improve that made him look like a rock star.
When you find yourself in that legacy application that is out-of-date and has little to no documentation. Strive to make it better and people will notice. You might even change people's perceptions of the application.