Back in 1999 I flew my BMW GS from Los Angeles to Madrid.
Using Lufthansa air cargo. Back then, you could do all the paperwork yourself and
drop off the bike at the terminal. Did that and then flew to Madrid. The day after I arrived, Lufthansa called me at the hotel I was staying in and told me the bike was ready for pickup. took taxi out to airport and retrieved my bike. Went to fuel station right outside airport and then back to hotel.
Cost to ship bike from LA to Madrid was $1100 USD. I was in Europe for a long time so it was worth the expense.
Now, since 9/11, you no longer can do the paperwork yourself, you have to have a licensed and bonded broker do it. I have no idea what it cost to do anymore, but I'd imagine it's at least double what I paid in 99.
So, if you are going for a short time, then it's probably easier and cheaper to rent a bike while you are there.
No issues using a US tagged bike there.
Spain is a wonderful country to explore by motorcycle.