If you find yourself reaching the end of the game not at level 50 but having completed all events then you can replay events to earn XP. Quickest way I found is by replaying the last Sprint event (Hans circuit reverse Norway) that you unlock. It’s 3 laps and can be done in just under a minute. I was getting 260 XP each time I won and I needed 5 wins to level up. 4 to get the XP bar (lightning bolt) full and a 5th to get it to actually go to the next level. After the race, watch the XP register in the lightning bolt and then hit retry. You keep the XP earned and can jump straight back into the race. At this rate you can level up once every 6 minutes providing you win each time. Once you reach level 50 the achievement will pop. No need to get the bar full after you reach 50.
Hope this solution helps!
My XP experience was certainly different from what the other solution and the walkthrough state. I suspect codemasters may have changed the levelling process so it does take until the end of the game. Might be wrong as I haven’t looked into it.
P.S This is my first solution on TA so if you find an error let me know so I can fix it.
Edit: Added name of event as suggested by | Ebon Hawk |