Fubari gets it right. These are the questions to ask. Like others here, I've been involved in projects like these, and in most cases, just the fact I was there was a sign that management knew there was a mess - They simply wanted to know how bad, and what it would take for me (or maybe a team) to fix it.
In one case I worked on, there was an obvious technical solution to the problem, but for various reasons management found the solution to be politically incorrect. I spent several months trying other approaches (carefully documenting all of them) and concluded that the obvious technical solution they had originally created was actually the best. Management was okay with that, in the end. It turned out that they were willing to confront the political drama once they had technical backing from someone outside the company that they trusted. (I had done work for this company before.) So don't assume you're the scapegoat. Yes, it does happen, but, in my experience, far less often than you think.