I often wish I had considered studying math back when I was considering getting a PhD in chemistry, but wound up as a programmer instead. But it's hard to make a living doing math research, you either wind up teaching or working in some practical field like programming or AI. I know two PhDs in math who each do one of those and neither can do any original math.