Sure, you can sum up Gray's "Elegy Written in a Country Churchyard" as a poem about death and mortality, but there's a lot more to it if you look under the surface. Beneath all that stuff about death are questions about how it's best to remember the dead, and the implicit question there has to do with social class. After all, poor people don't have time to write fancy biographies of their lives or contemplate their own death and mortality—all they have time to do is work to stay alive and support their families. Nor do they have time or money to put up fancy monuments over their graves. Does this mean that their lives had less dignity or are less worthy of being remembered?
In Gray's "Elegy," death is a democratizing force: it strikes down both the rich and the poor, so there's no point in erecting monuments to commemorate anyone. Death is a great equalizer!
By bringing up historical figures like John Hampden, John Milton, and Oliver Cromwell, Gray suggests that poor people have as much potential to do great things as rich people, but their circumstances keep them from fulfilling their potential. Bummer.