Do not descend into insanity contemplating the usage of English articles. As I have had occasion to point out before, these are some of the oldest words in the English language, coming to us directly from Old English. They have thus had over a millennium to develop many and various idiomatic usages - the OED finds over twenty categories of usage for the alone -- and for many of which the reasons are lost.
First of all, you are correct that the word quality is noncountable in the phrase "quality of life" meaning an enjoyable standard of existence. It is possible to say
There are three qualities of life.
But here qualities would be understood to refer to individual characteristics of living things.
The first question is why the definite article is an option. That is, we can talk about "quality of life" and also "the quality of life." The second question is why the indefinite article is also an option, that is, we can additionally talk about "an enhanced quality of life."
I believe the answers to the two questions are related and best answered in reverse order. I think it's well understood that different people have different judgments about what constitutes quality of life, and one person's acceptable standard might be intolerable to another. So while quality of life is a nondivisible standard, it isn't a unified universal, since there are many judgments about quality of life. So you can write generally and without an article
Higher income leads to increased purchasing capacity and enhanced quality of life.
but you might also be talking specifically about one aspect of life, material well being, which you may also identify with the indefinite article as one out of a set of aspects:
Higher income leads to increased purchasing capacity and an enhanced quality of life.
Perhaps a higher income does nothing for another aspect, say one's spiritual quality of life.
Now on to the first question, the one about the definite article. The ordinary usage is to designate a particular thing, e.g.,
Pride and Prejudice is the novel I read last week.
and this usage is inapt with a noncountable noun. But the definite article is also used with a singular noun when that noun represents its class as a characteristic member. Thus
We are studying the English novel next semester.
Not one, but many novels, possibly including Pride and Prejudice. In the same way, the quality of life represents the spectrum of judgments about the various judgments of quality.
It is also worth noting that nouns followed by prepositions, particularly of, attract an optional definite article. The OED finds the example
The Oxford of 1850 was an inhospitable locale.
That is Oxford (the city) in 1850 was full of cold and unfeeling people, but neither then nor now would we say
*I live in the Oxford.