You forgot about the innings of suck from Dice-K, who is even more expensive...
But you hit it on the nose. If the Red Sox can pay that kind of money for pitchers who stunk and had to be released, then $4 million for 120 innings of slightly above league average pitching from Tim Wakefield is a steal. Heck, there are Red Sox fans who want Theo to chase after Rich Harden in the off-season, who will get three times that much for anywhere from zero to 150 innings of slightly above league average pitching next season, but who seems to impress people because he throws 96 on those rare occasions when his arm isn't sore.
The way Wakefield's contract is structured makes allowances for these things. He gets an extra $50,000 for every start between 11 and 20, and an extra $75,000 for starts over 20, and $50,000 for an All-Star selection. I would add that in spite of this, he has on more than one occasion (not just the '04 ALCS) voluntarily given up a start to help the bullpen.
This is a no-brainer. You keep renewing that contract until Tim Wakefield decides he doesn't want to play anymore.