Not to say Ernie was clairvoyant (that means he's a mindreader), but out of the 8 million or so kids watching Sesame Street back then, there MIGHT have been a handful at any given time that were probably feeling down about themselves, and this was a magical way to help boost kids' self-esteem.
Back then (and even today) kids probably don't get told they're special or they're loved enough. So if Ernie can gently address those watching (it doesn't have to apply to everybody) that they are special, and should be proud of themselves, more power to him.