It can be a sincere expression of empathy with another person's travails, or it can be a demure form of sarcasm, i.e. "I'm going to be optimistic here and give you the benefit of the doubt that just maybe you were born mildly retarded". It's all in the context. I've usually only heard the expression from older women and in those cases it was used affectionately.
The first key to understanding the Southern accent/vernacular is to recognize that there is no the Southern accent. It's like the British accent in that it has innumerable local and regional variations. Linguists have long been fascinated with it because the Southern speech pattern preserved many elements of 17th-18th Century English.