I'd guess there are a variety of factors that go into the rankings not unlike these:
-win % last 5 yrs
-% of seasons making the playoffs
-% of last 10 seasons making the playoffs
-number of consecutive seasons making it to at least round 4 in the cup
- win % since inception
- # of seasons since last demotion (if ever)
- average cup performance (in terms of average round advanced to)
-number of consecutive seasons without a losing record
- number of consecutive seasons without having to play in a relegation series
-% of seasons with a winning record
etc. etc.
Look at you, already scouting your opponents for next season! ;)
I don't know how far back the ranking stuff goes, but I also know that playoff wins seem to factor into it heavily. That, and of course I think that the ranking algorithm picks a "companion team" that you're fairly similar to and ensures that you're always at least one spot behind them, at least in my experience. ;)