In "Elegy Written in a Country Churchyard," Gray, or his speaker, certainly does not criticize educating the poor. His sentiment is that among the poor buried in the churchyard there may well be people like Oliver Cromwell (but kinder) or like ruling senators, except that they had no education.
And what kept them from having education was their poverty. Penury, or poverty, is cited as what keeps poor people, like those buried in the cemetery, from achieving successes like those achieved by leaders such as Cromwell and senators.
Thus, in the poem, the speaker certainly condemns poverty, but does not criticize educating the poor.
If I have to choose between these two choices, I will say that Gray is condemning poverty. I would say that he is saying that poverty robs society of "resources" -- of people who could have been more "valuable."
In the poem, one of the things he is saying is that there are all these people buried who no one has ever heard of. He is saying that maybe some of them could have been great people except that they were born in the wrong circumstances.
Since this is what he is saying, I do not think he would criticize the idea of educating the poor -- I think he would like it so that those people would have a chance to realize their potential