First, I'll just say this about the bonuses themselves: the argument that no one high-up at AIG-FP deserves a salary is ridiculous. Surely there were some executives that did a good job and brought money into the institution. If there weren't, that would be the second-best reason to let AIG drown in the sea of its own creation. (The first being that we shouldn't be rewarding a failed company.)
Anyway, on to the stupid tax. Yes, it's stupid. But I see no reason it would be declared unconsitutional. A 1987 tax increase retroactive to 1986 was upheld by the Supreme Court in 1994 (United States v. Carlton, 512 U.S. 26) in a case that cost the plaintiff $600,000. A 1981 case (United States v. Darusmont, 449 U.S. 292) upheld Ford's Tax Reform Act of 1976, which retroactively increased minimum taxation amounts. Most absurdly, the Court of Appeals for the Third Circuit upheld a rule in 1996 (Tate & Lyle, Inc. and Subsidiaries v. Commissioner of Internal Revenue Service, 87 F.3d 99) that was finalized in 1993 and altered the interpretation of a regulation that became effective in 1984, requiring retroactive taxes to be paid for the previous ten years. If'n that ain't retroactive enough to violate the conscience, I don't know what is. There are many other examples.
Furthermore, for anyone touting ex post facto prohibitions in the Constitution, the Supreme Court decided over two hundred years ago (Calder v. Bull, 3 U.S. 386) that provision applies solely to criminal cases -- civil cases are exempt from the clause. This would not be a criminal case unless someone refused to pay the tax, but then they would be breaking the law after it was made and it wouldn't be an ex post facto issue.
The Contracts Clause may be referenced, but that clause has been upended since at least the New Deal Era, and it only applies to the states anyway. The Takings Clause of the fifth amendment could be sensibly applied, but I think we all know how impotent that restriction has become -- as long as the tax would satisfy a "public purpose" (satisfying the bloodlust of the mob would likely qualify) it'll do just fine under that attack. Considered further, the fact that any case attacking the law would involve economic rights would almost certainly doom it from the outset, as these rights are held more breachable than others, for reasons my rational mind cannot comprehend.
The Attainders Clause is the only method which, in my view, has even a remote chance of success. However, since the law isn't meant to replace a trial and find anyone guilty of any crime, even this option's probability of success looks grim. Even the premise that the law is intended to inflict punishment on a specific group of people is flimsy. The Supreme Court, in upholding (yet) another retroactive tax scheme, stated in Welch v. Henry (305 U.S. 134), "[t]axation is [not] a penalty imposed on the taxpayer... It is but a way of apportioning the cost of government among those who in some measure are privileged to enjoy its benefits and must bear its burdens." Taking this view, that taxes are not punitive measures, the Attainders Clause attack fails.
In conclusion: the law is stupid and ridiculous, and is an illustration of partly why I think the market is in turmoil (there is no solid ground upon which investors can stand), but will not be ruled unconstitutional in any court challenge, barring massive reconsideration of precedent.