Spencer's sexuality is something he hasn't really 'struggled' with, per se â at least, not the romantic attraction part of it. There was never any fear of rejection from his family; his mother had always made it clear from an incredibly young age that there was not a single thing he could do that would make her stop loving him. Her love was && would always be entirely unconditional.
Any struggle he had with attraction to men was more when it came to which bullies would cause physical harm && which ones would cause the more emotional kind; it was always the boys that laid hands on him. As a child ( && especially after Alexa Lisbon tricked him into getting sexually assaulted by the football team, ) attraction to anybody wasn't safe, but especially not to the boys. There was no 'i can't be attracted to boys because i'm a boy && that's bad,' it was always 'i don't want to be attracted to boys because all they do is hurt me. but then, so do the girls.'
So, for a while, romantic attraction was a bit of a 'struggle', in a sense, for Spencer, but never because he felt it was wrong. It just always caused him harm, to the point that the 2 concepts were inextricably linked in his mind for years.
It wasn't until he graduated high school && left Vegas behind for college that romantic attraction began to become separated from the idea of pain. It was still something that was hard for him to grasp, for a while, but now the reason for that was because he was a 12 year old child prodigy surrounded by people who were far older than him; the youngest possible people he'd meet in college would be 17 years old. Not the most conducive environment for a young boy to safely explore romantic attraction.
It really isn't until puberty hits that it feels safe for him to figure out what romantic attraction means to him. The first person he falls for is his childhood friend, Ethan; they've grown up together, spent their childhoods competing against each other, but it isn't until they're separated by a couple hundred miles of distance && only seeing each other during Spencer's breaks from Caltech that he starts to see Ethan in a new light. Ethan is safe to fall for; even when they were childhood rivals, they were friendly. It was friendly competition, stimulating, && every time Spencer thinks about those days his face gets warm && there's a funny feeling in his chest.
Ethan is Spencer's first kiss, when they're both 15.
After that, sexual attraction comes into play, && it's far, far more confusing to Spencer than liking boys ever was.
For a very, very long time, he doesn't understand it. For him, sexual attraction is practically nonexistent for most of his puberty; all he knows is that he doesn't understand how his peers can look at strangers they don't even know && find them sexually appealing. He can look at a stranger && appreciate the parts he finds attractive, sure, but to want to have sex with them without even knowing them is a foreign concept for him. For a while, he thinks maybe he'll just never experience sexual attraction; 'asexual' was coined as a sexuality term in the late 1890s, && he thinks maybe that applies to him. At least it has a word, he thinks. At least there isn't something wrong with him.
Then his relationship with Ethan forms when they're teenagers, && that theory goes completely out of the window. It's then that he realizes maybe it's less that sex in general disinterests him, && more sex with people he hasn't already formed a bond with. He wouldn't have a word for this until well into adulthood, when the term 'demisexuality' is coined in 2006. Not being able to put a word to what he feels does make him mildly uncomfortable, but only in the sense that he prefers things to have strict, rigid definitions. He's not bothered by his need for a romantic bond to precede any sexual exploration, he just doesn't like not having a term for it.
I don't want to go into too much detail about a minor's relationship with sex past that, but the point is, by the time Spencer turns 18, he has a pretty decent grasp on his sexuality && is comfortable with himself. As he grows older, his identities solidify; he is comfortable as a bisexual && demisexual man, with a slight preference towards other men. This is not something he will ever feel shame about.