Reporting a big success with this one. I showed up for my appointment today, showed a US passport and CDC card. I am not affiliated with the Spanish healthcare system.
One snag was that they require a Spanish phone number. They send a text message to this number with a 4 digit verification code and instructions to access the QR.
The person working there was really nice and let me use their phone number. You may have some luck with using an online phone number but beware that your private info may get sent in the SMS (if you try to use a public online SMS number).
I received a double sided printout. The front side has a QR, name, date of birth, and vaccine info. The back side has the four digit verification code from the SMS. The person advised that the paper version was more useful than the digital version (but currently neither are required in Spain).
The Tarjeta Sanitaria (aka health card) is described in more detail here:
https://www.comunidad.madrid/servici...jeta-sanitaria. They have links to phone app versions for Android and iOS but it was not available in my country so I am not able to test it out.
Scanning the code in the Spain Travel Health App (
https://www.spth.gob.es/ has links to download) lets you add it to Apple Wallet. Weirdly my name is entered as FIRST MIDDLE LAST null, hopefully this doesn't cause any problems. It looks fine on the paper printout.
I downloaded the Portuguese app Passe Covid (
https://apps.apple.com/pt/app/passe-covid/id1574312811) which is pretty simple. It was able to scan the code successfully. Name appears the same on this app too.