Jessie J actually co-writes a lot of her songs so she’ll be getting those sweet publishing royalties. She also co-wote Party In the USA for miley cyrus, i bet that song alone generates a shit ton of money.
I have a relative who co-wrote a song for Fleetwood Mac, on what’s generally considered their worst/least popular post-Rumours album, but it made it onto a ‘Best Of’ in the 80s and I’m pretty sure he still lives off the royalties.