"Search" isn't Google's product. Google hasn't been a search company for 20 years.
"Ads" is Google's product. And the only way they'll go bankrupt is if 1) companies realize that advertising is pointless (I'm not holding my breath), or 2) some other company takes over from Google, which seems unlikely without government intervention (I'm not holding my breath).
Google is a shit company, but they'll still be around 20 years from now, because our economy is nonsensical and irrational.