I have had a variety of white cars over the years and maintain one to this day. I also have had a pearly white bike for many years. My advice would be to tackle the refurb job in stages: soapy wash, wipe with WD-40, soapy wash, dry, clay bar rub (as mentioned by
Duragrouch , and finish with a polish with cleaner wax (e.g. NuFinish).
Bike paint is typically thinner than automotive paint, so I'd be reluctant to use a rubbing/cutting compound for fear of cutting through clear coat, or worse, paint. Similarly, bikes rarely have the same kind of deeply embedded dirt as cars do simply because of the speeds at which cars get hit with stuff, so rubbing compound is probably overkill anyway.
I won't categorically say that rubbing compound should never be used; it may be necessary in some cases. Rather, I'm just saying that I'd proceed to do the paint correction in stages, and use the hard cutting stuff as a last resort.
Lastly, once the finish is to your standard, you could do a final coat of hybrid ceramic wax; strip any cleaner wax first (wipe with 90% isopropyl is great) to ensure hybrid ceramic bonds directly to paint. You could go full ceramic, but besides being fairly pricey-- maybe $100 for a home job kit-- it's also probably overkill for a bicycle in terms of protection demands, because bikes just don't see anything like the weathering a car gets. I do ceramic coatings on my cars, but don't bother with my bikes because they keep just fine for many years using just a basic cleaning routine of wash and finish with spray detailer and in-between wash wipe downs with WD-40. I've been doing that since '06 or somewhere around there, and have 10 year old bikes with finishes which look as new. As a funny aside, three years ago I sold the first bike I started wiping with WD-40, an '06 Novara Big Buzz purchased new for $600 from REI to a guy who thought I was crazy to sell it to him for just $500! Yeah it was kitted up nicely and had some upgrades, but it was just my commuter/utility bike, but the thing was, it looked great...