Though the crew treated badly, I do find it assuring that Captain Picard chose to keep Lt. Barclay on his ship rather than transfer him to another ship, which carried with it the implication that Captain Gleason had done just that thing. I would think this might have an influence on how the lieutenant views himself knowing that one crew has rejected him.
And, I like it that Geordi LaForge and Deanna Troi kept in touch with him after he had left the Enterprise. I feel Voyager did right with Barclay.
I don't think it's possible to diagnose Barclay's condition. From what I have seen, in movies and tv shows, the people who write scripts are for the most part ignorant of mental disabilities and mental illnesses. When they do reveal knowledge of these two, it comes off as superficial and flawed.
That's a good point about Picard. He was the most fair to Barclay in that episode, I think. Guinan as well. La Forge and Riker were a bit mean to him in Hollow Pursuits.
As I said above, I can relate to the character, but obviously I'm not a genius engineer.
TV writers often get mental conditions wrong, true. One positive and popular Aspie character in recent memory is Sheldon Cooper on the Big Bang Theory (the writers deny he has it, but he screams it to me, and to many others, and I have AS myself)
Barclay probably just has severe social phobia