And, just in case you are around when the shit does hit the fan, then, surely, you would want to have some evidence to show that you pushed to take action to correct the problems you saw. There's no mention even of any documentation of their concerns, which surely should be priority number one. I have seen similar (if less extreme) cases where developers knew about problems that no-one acted on. And guess what? When the impact from the problems became apparent, they took the blame, because they had no evidence to exonerate themselves. If the culture of the upper management is not as bad as you assume, then you will end up looking like the bad guy by keeping quiet.
Most large companies send a form that refer has to fill in. Rate 1 to 10 on attention to detail for example.
If the person giving the reference does not like you, there are many ways to bend the truth. Mark you down for lateness, when it was in the companies culture for implied flexitime for example.
I have been looking up information about employment law (mainly in the United States, but also around the world) as part of a promised update to my FAQ on company hiring procedures
https://news.ycombinator.com/item?id=5227923
that I will post to my personal website.
Many large companies will not give a reference at all merely confirming dates worked from and too.
I think it was because someone once sued (successfully) over a bad reference.
Remember who put him there, if it was bad choice, it means upper management made a bad decision. In my experience upper management will do anything but admit to a bad decision.
Just silently leave for another job, try to make sure you will get a good/neutral reference. Remember future employers will just think your bad/unskilled if you get a bad reference rather than the fact you got into politics. Larger companies have an automatic no, to bad references and won't accept excuses. Since they assume your a bad person/almost criminal (the only point large corporates will give a bad reference normally) and probably lying. Limiting you to small companies for your next job.
Its nice to think you can be a hero and fix this, but you can only do that if your someone with significant power in the company like a founder, or an early employee who is best buds with senior management. Since HN is full of these types, they can be idealistic.
I've been through situations like this, and this is what I would do now rather then potentially making your life hell.
Situations like this is a massive problem with modern company structure.