Brian, We've done this in reverse several times but have always flown as it is an easy hop to & from. We've had good luck with Vueling Air - inexpensive & good connections between Frankfurt & Barcelona.
Not sure just when your cruise ends, but remember that the summer exodus of AD/dep headed to CONUS begins late May/early June so you may not want to hang around for a long while. Or you might consider touring in Spain & trying for a flight out of Rota.
I did this years ago when getting out of Germany was difficult. I recently read of a traveler getting good travel arrangements - rail/bus - to Rota through the travel agency in the El Corte Ingles department store in Barcelona but I have not personally checked this out.
If you haven't been to Barcelona (or if it's been a while) spending a few days there would be a great way to start your trip. We stayed at Hostal Q, 1 block from Placa Catalunya at the Urquinaona Metro stop. Rooms are basic but clean & the location can't be beat. Easy walk to Las Ramblas & the Bari Gothic & the airport bus leaves directly from Placa Catalunya if you decide to fly.
Runnerbean free walking tours leave daily from Placa Reial (off Las Ramblas) - we did the Bari Gothic tour & it was very good.
FYI - If you decide to fly to Germany, there is no longer a free military shuttle from Frankfurt airport to Ramstein AFB. It's about a 2 - 2 1/2 hr train trip to Landstuhl, then a 12 euro taxi ride to base. An hour's train trip from the Frankfurt airport would put you in the middle Rhine region with lots to see & do there. We spent a week there in Walter Huppert's lovely apartments overlooking the Rhine in St Goar - 36 euro/nt, 2 BR, washer, wifi. It's about 2 1/2-3 hr by rail to Landstuhl from there but with hourly connections, it's pretty easy.
Hope this helps. Have fun with the planning. Happy travels & may the Space A gods be with you!