Basically, from bar 9 there is a mixture of regular and irregular time divisions, but Rakhmaninov hasn't taken the trouble to notate them exactly. I suspect he didn't want the performer to get too bogged down in the detail. And when you get it up to speed I suspect you will find it quite easy to fit the given notes into the two beats of each bar.
If you can, set your metronome to give you two beats per bar and fit the groups of 8 or 9 (or whatever) into the available space. But if you are having to take it very slow (and I did at first) it isn't so easy. I got the notes 'under hand' by thinking of it in four and subdividing each group into whatever regular or irregular time division fitted best. For instance:
bar 9: think of as 4 groups of 4 (ie semiquavers or sixteenth notes)
bar 10 & 11: 1 group of 4, one group of 5 and two groups of 4
etc...
I think you can get through most of it by thinking in terms of groups of three, four or five. If one beamed group contains 9 notes, think of it as one group of 4 and one group of 5 (or vice versa). If one beamed group contains 7 notes, think of it as one group of 3 and one group of 4 (or vice versa). Hopefully you get the idea.
Now strictly speaking, you should be playing each beamed group evenly across each minim beat, but the above method gives you a way of thinking about it while you use your metronome to learn the notes, and you can practice being more free when you get it up to speed. But in any case, you've still got more or less the effect even if you keep thinking about it as four groups per bar.
But, the real difficulty starts at bar 35 (I think) where you have 2 against 3. Or bar 55 where you get 2 against 7. Or at the Un poco più mosso, where it goes bloody fast in quaver triplets with two hands. Enjoy.
Hopefully that made sense.
Richard.