I don't get why there are so manny comments on the blame game.
FIRST! If the project fails, you all fail.
Every member is responsible for the succes of the project.
SECOND! You're career, you decide at which level you participate.
Choosing a carreer path as a developer is great, most of the time you are the last person to work on the final product.
This means that most of the time you are directly linked to the final quality, do you want to be known as the person who makes crappy quality? If not don't deliver crappy quality.
They might seem very harsh, but there are very few clients who actually understand what you are doing as a developer. They don't hire you for you're code, but because you are part of their solution to their problem. For myself I set a certain level for the endresult, being a developer we are the final ones to touch a product. This means we have to be sharp on every single deliverable someone before us made, if it doesn't meet my quality I am responsible to get it at my desired level.
When reading the post it seems like all grip on the client is lost, before doing anything you're team has to regain control. If the client had the knowledge to solve his problem, he would not need you're team.
Second you already know you won't be able to finish te product before the deadline (and maybe never, because of the legacy). Not loosing any more money on it might be the biggest success available, development is just one part you are losing at this point and in my experience other roles (like interaction/design/frontend/concept/sales/project management) are also part of the solution (and are able to take more then 60% of a budget).
So be part of the solution...otherwise you're part of the problem.