Well, Pepsi was originally sold as a miracle cure for Dyspepsia. (or upset stomach)
Dyspepsia was a massive problem at the time, as food safety laws didn't exist. And neither did refrigeration. So the food available in cities was often expired, and then slathered in toxic chemicals to hide the fact that it was expired.
Coca-Cola was also first marketed as a medicine, but for headaches and hangovers. Cocaine and caffeine might work on a headache or hangover...
If you want a drink that tastes like Pepto Bismol the answer is birch beer. It has a very similar wintergreen/methyl salicylate type flavor and is frickin' great.
My personal favorite is Boylan's Creamy Red Birch Beer but it's expensive as fuck.
A less stupidly expensive alternative is Pennsylvania Dutch Birch Beer. Still going to run you $20+ for a 12 pack on Amazon. Fuckin' shipping costs are insane.