As an ESL speaker, I'm puzzled by these two phrases... Is "what a pity" used as often as "what a shame" in an English-speaking country? Is there any difference between them in meaning or usage?
For the most part, they are the same, but there are some slight differences.
What a pity expresses sorrow. It is harsher than saying "I feel sorry for you," but it still shows sympathy. If a boy gets in a fight at school, his father might say "What a pity" to mean that he wishes the boy had not gotten in the fight in the first place, but he is still sorry for his son.
What a shame is a little colder. People use it to express a loss of respect for whatever they are talking about. For instance, if the boy is the one who started the fight, his father might say "What a shame." This means he has lost some respect for his son.
Nowadays, I hear "what a shame" more often because it only has three syllables instead of four. Instead of "what a pity," I usually hear "that's too bad" or something similar.