It's not that easy. For a well-functioning society it is indeed better to invest educational resources broadly to have everyone do a bit better. However, in many scientific disciplines (and especially in areas such as mathematics and theoretical physics) it seems most progress comes from a small number of high impact individuals (e.g. Newton, Einstein, Feynman etc). Thus, for robust scientific progress you should actually direct your educational resources towards the most promising kids.
Ultimately then your preferred distribution of educational resources depends on your values. If you care more for scientific progress than for social issues, then it is rational to favor targeted rather than broad spending of educational resources.
I personally do care about both, but faced with a choice I'd go for scientific progress because ultimately advances in science, technology and medicine prove to be the best way to reduce human suffering.
I sure know it, because I was a bit lazy, but they do tend to go together. Even if they didn't, I'm fine grouping them together. The distinction doesn't matter for my purpose. Crudely, say that success potential is the product of those two. Multiply hours of effort by IQ if you like. Anyway, it doesn't matter for my purpose.
"There is more aggregate value in having everyone do a bit better than having an occasional student who's amazing and pampered."
That all depends on the trade-off. How much will you hurt the top 10% and how much will you help the lower 50% by the proposed change? If the hurt is great (likely) and the help is minor (likely) then the result is a loss.
A. The brightest folks are not always the hardest-working. "Hard-working" in a student means blowing time on stupid worksheets and memorization instead of devoting resources to playful exploration of knowledge.
B. There is more aggregate value in having everyone do a bit better than having an occasional student who's amazing and pampered. Especially if they then proceed to go leave and never interact with the local economy again.
C. If your society is predicated on the notion of the occasional brilliant genius popping up to care for the slavering morons, maybe your society should fail.