My guess is that AI safety papers are more impactful than longtermist econ ones, since they are directly targeted at significant near-term risks. Having said that, there are now a hundred or so people working on various aspects of long-term AI safety, which is more than can be said for longtermist econ, so I don't think the impact-difference is huge. Maybe we're talking about a three-fold difference in impact, per unit time invested by an undifferentiated EA researcher - something that could easily be overriden by personal factors. But many longtermist researchers would argue that the impact difference is much more or less.
My experience in transitioning from medicine to AI is that it was very costly. I feel I was set back by ~5 years in my intellectual and professional development - I had to study a masters degree and do years of research assisting and junior research work to even get back to my previous level of knowledge and seniority. From an impact standpoint, I clearly had to exit medicine, but it's not clear that moving to AI safety had any greater impact than moving into (for example) biosecurity would have.
For most people in a PhD in any long-term relevant subject (econ, biology, AI, stats), with a chance of a tenure-track position at a top-20 (worldwide) school, I expect it will make sense to push for that for at least ~3 years, and to postpone worries about pivoting until after that. Because switching subjects reduces those odds a lot.
More broadly, as a community, we mostly ought to ask people to pivot their careers when they are young (e.g. in an undergraduate), or when the impact differential is large (e.g. medicine to biosecurity). Which I don't think it really is when you're contrasting the right parts of econ with AI safety.
Finally, I imagine quant trading is a non-starter for a longtermist who is succeeding in academic research. As a community, suppose we already have significant ongoing funding from 3 or so of the world's 3k billionaires. What good is an extra one-millionaire? Almost anyone's comparative advantage is more likely to lie in spending the money, but even more so if one can do so within academic research.