In-universe, obviously. But the question was about whether they were meant to be analogies for autistic-spectrum people in real life. Science fictional aliens, robots, etc. are almost always allegories for real people and real issues.
The reason Spock was such a breakout character was, in large part, because he was presented as an outsider, and thus viewers who saw themselves as outsiders struggling to fit in or to define their identity were able to empathize with Spock, to see him as a mirror to themselves. These days, we would understand that a lot of the social outsiders who identified with Spock or Data or whoever were on the neurodiversity spectrum. But at the time, that understanding wouldn't have existed, as Oddish explained quite well.