I have worked as a volunteer at the Pilgrim Office for two years, and will do so again this July and August. In my experience, errors do happen. The office staff are worked very hard, and at times, things do get "dicey."
The permanent staff only totals about a dozen people to cover seven-days a week, nearly every day of the year. They are very low paid. However, to a person, they all WANT to be there. Alas, they are only human. At times, they do rush, particularly as the crowds surge. During the summer months, the permanent staff are sometimes augmented by volunteers, such as myself. I know the permanent staff to all be dedicated to the job they do. Mistakes if any, are not made intentionally. It just happens a tiny percentage of the time.
Having been on the "other" side of the counter four times as a pilgrim, I acutely understand the importance of a correctly spelled name on a Compostela or Mileage Certificate. So, it is my practice to write the name (FIRST (in Latin) AND LAST) on a plain piece of paper BEFORE I set pen to Compostela or Certificate. I ask the pilgrim is this is correct? If they say yes, I write. If not, I make the changes.
Just as an FYI, I have also had some pilgrims react vehemently to the Latin spelling of their given name. Sometimes, their given name in Latin is not something they prefer, to put it mildly. In that case, I simply ask the Pilgrim WHAT NAME they want me to write. In my view the customer (Pilgrim) is mostly right.
Also, although not strictly required, I most always politely ask to see a passport or a national identity card up front, just so I can clearly see the "correct name spelling." All countries except the US have these identity cards. Most all European folks carry only these cards and not their formal passports when traveling. Everyone has at least one of these documents on them; passport OR identity card. Yes, this takes an extra 30 seconds per pilgrim, and this can cause the line to slow at times. But, it is very important to that pilgrim. So it is important to me. I can do no less for my fellow peregrinos.
As others have said, return to the Pilgrim Office with the incorrect Compostela or Certificate, and a document establishing the correct spelling of your name if you can. However, if you are not in Santiago de Compostela, mail a request to:
Oficina de Acogida al Peregrino
Rúa Carretas, nº33
15705 Santiago de Compostela
A Coruña – ESPAÑA
Include a copy of your passport or identity document establishing the correct spelling of your surname. Do not forget to provide the correct date you first stood for your Compostela and / or Mileage Certificate. If in error, as opposed to a matter of choice, the corrected copy will be provided free of charge.
FYI, My family too had their names bastardized by immigration officers when they first arrived in the US from Europe well over a hundred years ago. I have one entire branch of my family whose name was changed completely from the original, multi-syllablic Italian name ending in a vowel to "Andrews." This great aunt entered at Boston, Massachusetts instead of Ellis Island, New York. Evidently, the inspector at Boston had no patience for a "foreign" sounding name, so he changed it unilaterally, on the fly. To this day, every relative in this wing of my family has the Anglo-Saxon surname "Andrews."
Also, and germane to the Camino, following my first Camino in 2013, someone working in the office at that time wrote the Latin feminine variant of my given name "Thomas." So, instead of "Thomasum," I was named "Thomasinam." (At least that is my closest recollection). My mother, after 60 years of raising her son, was not at all pleased. I was offered a corrected version when I arrived to work as a volunteer the following year. However, I declined as the comedy value of the original was simply too great. So, now I have both versions, from different years. I may get the certificate reissued this year if I remember it...
If a sending a letter is not your style, you can also try an e-mail, preferably in Spanish, to:
oficinadelperegrino@catedraldesantiago.es
I recommend attaching a .pdf scan of your passport, together with the original information. You might also attached a .pdf file of the erroneous certificate or Compostela too, so the office staff can clearly see the "oopsie."
I hope this helps.