No matter what level you retire at, you get the same (single) generation bonus. It caps out at 16 generations. Level 32 is equal in XP cost to reaching level 31 twice. After that, the higher levels cost much more XP and it will "cost" you more xp per heirloom point.
If you are really set on playing CRPG and you aren't going to get bored of it in a month or two, I would recommend retiring at level 31 over and over until you reach generation 16. The XP bonus stacks up to the point that you get over 7000xp per tick when your team has x5 bonus. That's huge.
Going to level 32 doesn't require any more time spent; going to 31 twice or 32 once costs the same amount of xp. You get to stay at a high level as you gain another heirloom point. But if you are playing the long game, getting full generation bonus is worth it. You also get to try many different builds. You might find something new that you like!
I think the heirloom points go as follows:
Level 31: (8,892,403 xp) 1 heirloom point, 1 generation bonus
Level 32: (17,784,806 xp) 2 heirloom points, 1 generation bonus
Level 33: (35,569,612 xp) 3 heirloom points, 1 generation bonus (gain "Veteran" title when joining server)
Level 34: (71,139,224 xp) 4 heirloom points, 1 generation bonus (you get a title but I forget what)
Level 35: (142,278,448 xp) 5 heirloom points, 1 generation bonus (gain "Master" title when joining server)
Hope this helps, and hope someone can help me remember the level 34 and 36 titles. Also how many loom points do you get at 36?