Hes a mentally ill idiot,but not the type of mentally ill idiot he pretends to be. A true paradox of character.
Its also important to remember that Andy is not autistic. A head injury, no matter how severe doesn't cause autism. its just brain damage.
And honestly andy didn't even get that. Andy most likely fell in love with the hospital care he was receiving because andy LOVES (I cannot stress that enough) attention. He started his computer buisness after seeing Joe get praised for being so tech savvy, and it wasn't long after the accident that Andy started researching autism, began mimicking it, and grew into the overreaching diaper kaiju we all know and loathe.
one more detail for you: andy pretends to have all the symptoms of autism, which any expert would think strange considering how vocal and smart andy is.
The answer is fairly straightforward: Andy has Munchausen's syndrome and BPD.
I've been frequenting the Munchausens by Internet thread in Beauty Parlour (one of the best threads on the site imo) and the number of parallels Andy has with the girls on there is quite remarkable. Just like them, he fell in love with the hospital experience because of all the attention and sympathy that he got. And because those girls are BPD headcases, they are addicted to attention, chaos and drama, just like Andy. They want people to fuss and care for them, and leverage that into controlling and bullying the people around them. They also engage in "splitting", whereby the people in their lives flip between being their best friend and worst enemy constantly - think about Andy's relationship with his father, the medical system and the Police, who are his best friends and protectors until they do something he doesn't want, at which point they're 'buzing him.
BPD is commonly associated with women, but it's under-diagnosed in men (the same way autism is under-diagnosed in women) because male patients behave differently. Whereas a female BPD patient will use sexual promiscuity and the strategic withholding of affection to manipulate people, male patients will resort to more direct bullying the way Andy does.
As for Munchausen's, the girls in the MbI thread often do have genuine health conditions, but they will either be in denial about them or actively want to hide them because they don't make them look sympathetic. Typically the Munchie girls have eating disorders and/or drug addictions (though sometimes it will be a physical condition that they are also in denial about for whatever reason), but cover up their weight loss and frequent trips to Dr. Feelgood by pretending to have "zebra" illnesses so they can be helpless waifs who force their long-suffering families to look after them and drum up sympathy (and sometimes money) on Instagram. Andy is just doing his version of this. He has some kind of Cluster B personality disorder (my money's on BPD) and a painkiller addiction (remember the
insane amount of medication he's on), but neither of those get him asspats so he's decided that autism will be his weapon of choice.
The MbI thread also chronicled a girl called "Rose" who LARPed as a diaper-wearing incontinent waif (getting herself an unnecessary tracheotomy amongst other surgeries) but her "ooh look at me I'm a poor widdle sick girl" Instagram was a front for her selling ABDL fetish porn. Sound familiar? She even turned up on the Farms to admit she had a diaper fetish, then a couple of weeks later she was dead in unclear circumstances. It's actually quite common for Munchies to die, often because of complications from unnecessary surgeries, self-harm (a common Munchie strategy is to inject poop water into themselves to induce sepsis and an exciting ER visit, but sepsis can be kinda killy) or just plain-old suicide. Andy's habit of lying down in traffic could well kill him in a similar way.
It's really interesting to compare the male and female munchies, the methods are different but the psychology is the same.
EDIT: Also, the defining symptom of Munchausens (as opposed to malingering or hypochondria) is that you deliberately harm yourself to induce symptoms. I've mentioned the poop water, girls will also mess with their (unnecessary) feeding tubes until they become displaced or infected (ER time wooooo!), and in the most horrifying example, Kelly Ronahan, she picked away at her legs until they needed to be amputated while insisting it was a disorder called Bechets which (spoiler warning) does not in fact cause your legs to fall off. Andy banging his head against the wall is his equivalent behaviour. He may well have actually given himself brain damage doing that, in the same way that the munchie girls self-inflict all sorts of things, some of which kill them.