Heat is the clock
Roof lifespans you see online are usually national averages. In Riverside, summers with weeks above 100 degrees shorten the life of anything made with asphalt or rubber, while tile and metal barely notice. The useful question is not just what the roof is made of, but which part of it wears out first.

Asphalt shingle: 18 to 28 years
Architectural shingles here typically last 18 to 28 years. South and west facing slopes go first, often several years ahead of the north side. Light, cool-rated colors and good attic ventilation push a shingle roof toward the top of that range.
Concrete and clay tile: the tile outlives the paper
Concrete tile can last 50 years or more and clay longer still. The felt underlayment beneath them usually lasts 20 to 30 years. That is why so many Riverside tile roofs from the late 1980s and 1990s need an underlayment lift and relay now, even though the tile looks fine.
Modern synthetic and two-ply underlayments last much longer, so a roof that gets new underlayment today can go decades before needing it again.
Metal and flat roofs
Standing seam metal with a quality finish lasts 40 to 60 years here. Flat roofs vary the most: a white single-ply membrane lasts 20 to 30 years, while coatings need renewal every 10 to 15 years.
Whatever you have, flashing and pipe boots often fail first. A cracked boot at year ten can cause more damage than an aging roof at year twenty, so they are worth checking every few years.