Is it a bad contract? Yes.
But the dude is a major league ballplayer. I think you'd have more of a beef if it was a career minor leaguer. But the guy did post a .309 AVG and .379 OBP last season in 450+ ML PA's. The guy's not a complete piece of ****. Is he worth $23.5m over the next two seasons? No, certainly not at age 37. But in terms of bad contracts, it's probably not the worst you'll ever find.
I'd be VERY thankful that they cut out the last three seasons of the contract and deal with it for the next two.