Where does great literature and art come from? [ETA: A more accurate version of the question might be: How is it produced or generated?] Herewith a couple of perspectives, not original of course (though the labeling may be).
The first could be called Individual Genius Meets An Imperfect World. The artist converts personal misery into art (consider, e.g., how much mileage Dickens got out of his relatively short time in the 'blacking' factory). The misery can be collective rather than strictly personal (e.g., no Napoleonic wars, no War and Peace).
The second perspective could be called Individual Genius Meets Its Predecessors. The artist struggles to carve out her or his own terrain in conversation with, or response to, what others have done. This is about the anxiety of influence, in Harold Bloom's well-known phrase.
The two perspectives are not mutually exclusive. A given work can respond both to an external event and to the influences of the artist's predecessors (or perhaps contemporaries).
Does great art require the prod of misery, frustration, injury, imperfection, unhappiness, injustice? Would there be great art in a utopian society? My impression is that some sketchers of utopias (say, the nineteenth-century utopian socialists, or Skinner in Walden Two) have not been much concerned with this issue. Where is the Marxist tradition on this? Is the whole notion of great art a decadent bourgeois concoction? Are the question's assumptions irrelevant or meaningless in a communist society where, as Trotsky apparently thought, the average level of human creativity would rise to heights never before seen? In the absence of empirical evidence on the last point, I guess we're all free to speculate.