I've worked with a million lines of C++ code written by a guy who doesn't understand C++. There's a 10k line loop that's "Unabstractable" according to my former boss. Everything stored custom linked lists, even trianglated meshes. Copy and pasted code everywhere. Maybe I should leave the organization.
Huh. I, also, have worked with a large C++ codebase written by a team of people who were not C++ programmers. Also (?) VFX code. My favourite was the 3k line long single method.
As for whether or not you should leave, that depends on how happy you are swapping your life for money. There are good jobs, but no guarantees you'll get one of them.