I think it depends on the teams. I don't want to see Bangladesh playing 3 Tests against Australia, that's more farcical than the current tour of India. I don't even think I really need to see NZ given 3 against Australia, not the way they're playing right now. NZ vs WI though, that should be longer, they are very closely matched.
Probably, extremely long ODIs series and extremely short Test series should be impossible unless certain conditions are met. For a long ODI series, maybe the two teams should be very closely ranked. Even then, I don't know if there's a legitimate cause; for one, 6th placed England thrashed 2nd placed South Africa and secondly, it would still have been a thrashing in a 7 match series. In fact, the only long series that has come down to the wire in recent times was a demonstration of who India needed to drop from their ODI side. Taking all that into account, 5 should be the maximum allowed unless it is a tournament.
The worst 2 match Test series are the ones like Sri Lanka vs Pakistan or NZ vs New Zealand. These series should be more interesting than the respective boards seem to think they are. The Test rankings appear to be a fairly good representation, Sri Lanka holding the 4th spot and England behind them, Pakistan hovering in the middle due to a lack of matches, but NZ and WI down the bottom are evenly matched. Maybe the rankings could be used to prevent a two match series happening between two potentially competitive teams, but allowing the option of shortening the series in the event that the two teams are quite distantly ranked.