CHARLOTTE, N.C. ( TheStreet) -- The decision by Federal District Judge Jed Rakoff to reject a proposed settlement between Bank of America ( BAC - Get Report) and the Securities and Exchange Commission will turn up the heat on bank CEO Ken Lewis, and that's probably a bad thing for BofA shareholders.

In a decision released Monday, Judge Rakoff threw out a proposed $33 million settlement, which would have closed the book on the regulator's charge that BofA lied to shareholders about $5.8 billion worth of bonuses to be paid to executives at Merrill Lynch before it was acquired by BofA. The smoking gun in this case is a Nov. 3 proxy statement wherein BofA stated Merrill had agreed not to pay bonuses ahead of the deal's close, when in fact the bank had consented to the payments to Merrill executives.

In his statement, Rakoff wrote that he found it against "the most elementary notions of justice and morality" that "shareholders who were the victims of the Bank's alleged misconduct now pay the penalty for that misconduct."

As my colleague Lauren LaCapra points out, Judge Rakoff's decision can be construed as good for BofA's shareholders in the sense that they are no longer on the hook for $33 million.

What's not good for BofA shareholders, at least in the short to medium term, is that BofA's top executives are now likely facing an embarrassing and stressful trial, an ordeal destined to demand time and resources that might otherwise be spent helping the bank compete with rivals Citigroup ( C - Get Report), Wells Fargo ( WFC - Get Report) and JPMorganChase ( JPM - Get Report) during this key period of retrenchment for the financial services industry.

One solution would be for the board to fire Ken Lewis, but as I wrote last week, Bank of America will be hard-pressed to find a suitable successor. The two obvious internal candidates, Consumer and Small Business Banking President Brian Moynihan and CFO Joe Price, are facing the same questions as Lewis. An outsider would probably not be welcomed by BofA senior management, which most likely believes the bank hasn't done anything seriously wrong and is the subject of a witch hunt by overambitious public officials.

BofA is so large it can practically run by itself, as long as the U.S. recovery is for real. But neither further embarrassment for Ken Lewis & Co. nor wholesale management changes seems like a happy event for the investors in the bank.

-- Written by Dan Freed in New York.