Wikipedia talks about their function and mentions Ottoman castration of slaves to serve as guards and high level functionaries but this isn't really an answer for castrated opera singers in Western Europe. How would a boy end up becoming a castrato and how would that change his life beyond the obvious physical alteration?
Were most castrati slaves, singers/actors, or was it not as stigmatized as I'm imagining?
The typical socio-economic background of a castrato is debated among like, a whole TEN people, but I can tell you they definitely weren’t slaves! The old stereotype is that they were the poor 18th-born sons of Campanian dirt farmers, but according to my research that’s pretty much bust. Your typical castrato would be a native Italian boy (there were a smattering from other countries but it was rare), he was most likely to be from one of the Northern Italian cities, and usually his family had some existing connection to music, like his father could be a violinist at a church, something like that. Not uncommonly a newly castrated boy had an older relative who was an established and successful castrato. They probably were not that poor, though rarely anything close to nobility (though there are one or two we can name). Some castrati clearly came from land-owning families of some decent means. I’d say this is your most typical castrato: Northern Italian, urban, from a family that had some ability to amass and use money to further their collective goals, family often already working in something related to church or music.
One important economic background indicator we have are contractual records of young castrati. (Not all castrati went through a formal education, but many did.) These contracts would mark a boy’s formal entrance into a court, a conservatory, or a cathedral, and typically record: 1) who is validating this agreement on behalf of the boy (usually it is his father), 2) the boy’s age, 3) what his length of apprenticeship will be and what the penalties for breaking it are, 4) the remuneration (room and board and training, usually) and most importantly I think, 5) if this body paid to have him castrated. While many young boys came to schools already castrated, castrations were also often paid for by a formal body like this, and then the boy would be expected to pay it back through several years of musical labor.
There is a nice article on this called “Siena Cathedral and its Castrati” from this book which gives us several records to compare in the same times and place. Let’s consider this record:
Let it be stated for the present document that the magnificent Giuseppe Bernardi, a barber, has resolved to castrate his son Francesco, who is approximately twelve years old, because the boy has both the talent and the desire to advance in the profession of music and to serve our church. For that reason, the illustrious sir Alessandro Nini, our most worthy rector, out of pure generosity obligates himself to pay the usual expenses for the norcino from the funds of our Opera. He is doing so because he wishes to enhance and promote music for the greater honor of our church. And in exchange, said Giuseppe Bernardi promises that said Francesco, his son, will serve the same church as a musician and singer for the term of the next six years with the salary that he deserves and that our most illustrious rector thinks that he deserves. The rector will make sure that he receives instruction from the chapel master who is appointed during that time to serve our Opera. And if in the space of those six years, it happens that said Francesco decides to leave the church's employ of his own will or is fired for his own faults and failures, in that case said Giuseppe Bernardi is obligated to repay to the Opera half the salary that Francesco received from the aforementioned Opera and half of the fifty lire paid by the Opera to the norcino for the castration of said Francesco.
This is apparently a typical castration contract (including the 6 year term) for the cathedral. Despite what you may have heard, castration was performed by a professional who specialized in male genitals and it was not cheap, and there is an interesting little piece of evidence for this in this document: It is notable that an actual barber-surgeon (Giuseppe Bernardi), a man who has undoubtedly cut off a few pieces of humans in his time, does NOT “save money” and castrate his own son, he leaves it to a specialist barber (a norcino), which is really the best possible evidence that this was rarely done by anyone casually. Little Francesco would go on to be someone amply recorded in Wikipedia to this day.
It’s somewhat tough to know what to make of this, what it meant for these boys’ socio-economic statuses, could their family truly not afford this surgery, or was it just a hell of a lot smarter to do it this way, and their families had this economic knowledge to negotiate this out, and have someone else pay for it and get him a good musical education to boot? I mean, lots of families we consider today well off, cannot or just do not pay for their children’s non-basic education (i.e. a bachelor’s degree), this could have been socially the same sort of thing. The variety of “deals” these dads cut with the musical bodies also makes you wonder, some of these men could clearly hammer out a good deal that favored their son pretty heavily (a free castration and he only had to apprentice like 3-6 years) while some kids you feel kinda got taken advantage of (other bodies had much longer contractual obligations), so maybe some fathers had the social power that accompanies a wealthier background, while others didn’t have the power to get their son a better deal. Also, the Siena cathedral reimbursed one father for the cost of castration instead of directly paying for it, so clearly that family wasn’t too skint if they could front that kind of money. And, only a few fathers here couldn’t read and sign their own contract with the cathedral, which says a hell of a lot about these families’ backgrounds right there. So there’s hints that some castrati came from better-off families, even when they “couldn’t” pay for a castration.
Anyway. Very long way of saying “castrati were probably not that poor.” It’s arguable that families had to have a hell of a lot of knowledge and power to help their sons get this career started.
As for the second part of your question… what happened to these boys when they finished their apprenticeship? I’m still working on this one, but of the castrati in the database which I linked you to above, the vast majority earned at least part of their living in church music. After that, the second largest source of income was working in opera, followed by court appointments (think like chamber music, Farinelli singing to crazy kings, etc). Most cobbled together their daily bread from a mix of the first two, very few could live year round on their opera income (it was seasonal, fickle, and often required travelling, which few enjoyed). Many composed, copied music, taught students, published music books, and other music-related sources of income. A few were Kappelmeisters or other musical leadership positions like that. I know of one who exclusively played violin, five who were impresarios (ran an opera house), two who wrote librettos (the stories for operas), one who took up painting, and one funny guy who turned to [farming.](https://en.wikipedia.org/wiki/Giovanni_Velluti_(castrato%29) Many held orders in the church. We have to assume some didn’t stick to music after they were castrated, either their voice gave out earlier than they could afford or maybe they just hated it, but they are incredibly difficult to research.