Nice move for Portland.  They add a true double team worthy C down low.  They have a good backup C to makes sure he doesn't play to many minutes.  It should open up shots for the many, many shooters.  
As long as they save a healthy Shaq for the playoffs, they just improved there 2 year window to win a title.  
For Miami, also a good move.  Shaq was a bad fit for a lotto team.  Now they add a much younger C with a high potential that should reach that potential around the same time as the rest of the team.