I think negative utilitarianism is the most common ethical framework that would cause someone to choose the torture in the specks vs. torture case and no torture in this case. That's because in the specks vs. torture case involves people being harmed in both cases, whereas this case involves people gaining positive utility vs. someone being harmed. Some formulations of negative utilitarianism, like that advocated for by Brian Tomasik, would say that avoiding extreme suffering is the most important moral principle and would therefore argue in favor of avoiding torture in both cases. But a very simple negative utilitarian calculus might favor torture in the first case but not in the second.
I would guess that few people in the rationalist/EA community (and perhaps in the broader world as well) are likely to think that kind of simplistic negative utilitarian calculation is the morally correct one. My guess is that most people would either think that preventing extreme suffering is the most important or that a more standard utilitarian calculus is correct. For a well-reasoned argument against the negative utilitarian formulation, Toby Ord has a discussion of his point of view that's worth checking out.