To be perfectly honest, genetics is a very complicated topic, and as with all things in nature, it can be … rather messy. That is to say, if you have something that’s traditionally thought as being binary—such as biological sex—oftentimes, the actual definitions of those concepts are a bit on the hazy side when put in practice. That is to say, a lot of things determine the way a pokémon’s sexual characteristics develop (depending on the species), and sometimes, some of those factors don’t fall into the clean-cut categories one would think they would. For example, in pokémon that follow the XY sex-determination system (which is to say, most mammalian pokémon, raichu included), we’re commonly taught that males have XY chromosomes, whereas females have XX. However, there are a whole host of other combinations an individual may have, including XO (i.e., only one sex chromosome), XXY, XYY, XXX (right on up to XXXXX), and so forth. Granted, a number of these combinations actually produce genetic disorders that affect an individual’s day-to-day life (if the disorder doesn’t simply kill them early on), but there are combinations that can be virtually undetectable, save for levels of estrogen or testosterone and minor physical differences. An individual could even have a “standard” pair of chromosomes but develop sex characteristics associated with the other “standard” pair. In short, genetics are far from neat.
(As a note, the above merely describes mammalian sex determination. Reptiles, insects, birds, and all the other pokémon in existence have entirely different biological mechanisms for sex determination, varying from environmental factors, whether or not the egg is fertilized in the first place, right on up to whether or not the newly fertilized egg undergoes mitosis properly—the latter of which is very similar to the process of XY determination.)
How often does that happen, though? It’s difficult to say, and it varies by species, but it’s generally thought to be not particularly common or rare across the board. I know that sounds odd, but I mean that there really isn’t hard data concerning how often an intersex pokémon occurs. In mammals, though, it’s estimated that eggs have a 1 in about 1700 chance of being intersex like your raichu, but it’s somewhat more common than that in insects and crustacean pokémon. Genetically intersex bird pokémon, on the other hand, are either nonexistent or extremely rare. (The known cases of intersex bird pokémon on record actually aren’t genetic. These pokémon have suffered damages to their reproductive system sometime in their lives and consequently started to produce sex characteristics of another gender.)
In short, it’s not often that you see a pokémon like your raichu, but rest assured that she isn’t alone!