And should also be banned. A painkiller being promoted and bought more by customers just because it has more money to spend in advertising is morally worse than the mere creepiness of regular (buy BS stuff you don't need) targeted advertisement.
Who needs ads?
Level the playing field with an online catalog where patients can discover (in, say, random order for each viewing, to avoid even sorting bias) all available painkillers.
You can then add voting to the catalog, so patients and doctors can weight in for how good they think the painkiller is -- but with huge fines and prison for any company trying to manipulate buy those votes.
Google is one of the biggest companies in the world solely from advertising revenue. Same with Facebook and other social media. The more information they have about you, the more terrible the ad targeting
Is that really the "obvious" inference?
Perhaps they're just good at selling something outrageously overpriced to a category of particularly gullible marks. It wouldn't be the first time in advertising history, I'm sure.
And as counterpoint, if it was really so effective as you claim, why haven't we seen huge increases in ad spending lately?