Sure. After all many "sosh" and applied math programs take direct BS grads versus masters.
There may be some benefit from your masters econ work, but probably a lot won't carry over and you will need to take the regular grad curriculum for the new field. I would expect to spend the regular amount of time to get the Ph.D. degree in either field as a direct from bachelors would.
There's also the possibility of some gaps from your lack of a bachelors in either field. This can often be remedied just by taking the starter grad school classes. Many other fields get people coming in off-normal track (e.g. physics to material science) and those students get up to speed fine. Both of the fields you are looking at are reasonably "close" to economics. It's not like English major to physics Ph.D. Also, even if there is not a direct benefit from the econ masters, it will help your maturity and push you to get up to speed and done on time.
Note that the two areas you mentioned are rather different in math demands. Stereotypically, applied math > econ > sosh. Yes, I realize you said "quant" soc. problems...but still if we are talking a school of sosh, the professors/students won't have the same basic math chops that applied math does. Nowhere near. Yeah, they have to do some basic stats and read Lieberson's Making it Count, but this is not their total cup of tea.
Conversely, if you are being pulled by the idea of special social problems and fixing society, a sosh department may be right home for you. Note however, that you can do quantitative sosh analysis/research from many fields (econ, psych, education, jurisprudence, etc.) So think about what is attracting you and what kind of colleagues you want.
In addition to the fields you've mentioned, I would also consider a stats department IF that is of interest (some places this is separately named, not "applied math"). Super portable degree. But not the warm comfort of the sosh world solving society. And of course...much stronger stats!
Finally, worth considering why you want to move from the current program or if you could get an econ Ph.D. and still do sort of problems you want. Clearly there are social issues with respect to resource use by society. Also econ at the higher levels can be quite mathematical (if that is more what is drawing you). Not giving any strong opinion here and you know what turns you off. But articulating it might be helpful in going forward.
P.s. I wouldn't mention/worry about the high school grades. That's ancient history. It is normal for some bright students to mature later and then do strongly in college, after subpar high school career.