I sympathize with your frustration over the closure of the Thomas Gray question and I think that the process would benefit from being less adversarial.
What the close voters seem to be concerned about is that a question might use its literary content as a pretext for asking about some other topic, and if this is allowed then any question would be on topic provided you can find some literary work that refers to it in some way. The original version of the Thomas Gray question said:
Ignorance is Bliss. This is famous proverb [... from] Thomas Gray’s 1742 poem ‘Ode on a Distant Prospect of Eton College’ [...] What are the foundations of this idea?
The close voters interpreted this as if it was not asking about the poem, but only about the foundations of the idea, and so it looked to them as if the poem had been included as a pretext for making it appear to be on-topic.
However, it only takes a small rephrasing, from “What are the foundations of this idea?” to “To what religious or philosophical idea is Gray alluding?” to make the question unarguably on-topic. And very likely this is what you meant by the question all along.
I think that the process would be less frustrating if voters were braver about editing posts rather than closing them. When there’s the opportunity to make a tiny edit like this in order to make the post on topic, why not make it? Voters are generally in a better position to make the edit, since they have opinions about why the post is off-topic in its current state, and because the OP’s first language may not be English and so they may not find it easy to understand or meet the voters’ requirements.