There's no question he's grossly overpaid, but I think you're overstating things. In the six seasons he's started at least 20 games, he's had an ERA of 4.22 or lower in four of them. Three of those four were in the AL (with the Twins).
He's no ace and not worth anywhere near $12 million, but any team looking for a veteran back of the rotation guy might take a look at him. The obvious question is how much of that salary are the Cubs willing to eat in a trade (or what kind of bad salary are they willing to take in exchange).