I think Kelly deserves that contract. It's good in a vacuum.
That being said, I absolutely hate what Miami has done the last couple years. Blessed with a ton of FA space, they have given huge 4+ years to middle of the road, replaceable players or questionably dedicated players like Waiters, Whiteside, Kelly, Tyler Johnson, and James Johnson. None of terrible in a vacuum (except for the two Johnsons, arguably), but I feel pretty confident they'll be looking to get off of these deals in a year or two. Paying middling players big, long-term money kills franchises.
What're you gonna do when Ainge puts Riley under his boot, though?