In exchange for key support needed to form a new minority government in 2023, Spain’s Prime Minister Pedro Sánchez entered into an elaborate deal with Catalan separatist lawmakers in which he committed to getting Catalan, Basque and Galician recognized as official languages of the EU.
The move requires unanimous backing of the bloc’s 27 member countries, and Spanish officials spent the past two years lobbying European capitals for support.
My understanding is that each EU member got to choose a single official language, and that the EU was obliged to support that language. Regardless of whether Spain is willing to pay in perpetuity, I have a hard time believing that Spain is going to get unanimous support, since it'd presumably create a can of worms for other governments who would then get political pressure from regional groups to fund their particular favored languages as official EU languages, and who may not want to fund that. I mean, kind of a slap in the face to various regional groups in other countries if Galician gets official EU language status, but a regional language in another EU member that has official status at a national level doesn't.
https://en.wikipedia.org/wiki/List_of_official_languages_by_country_and_territory
There are a lot of official languages at the national level there.
EDIT: Maybe Spain could just commit to internally providing and funding Catalan, Basque, and Galician translations of EU official documents, as that wouldn't require sign-off from other EU members.
EDIT2: Huh. Apparently none of Catalan, Basque, and Galician actually have official language status today at the national level in Spain. If they were to become EU official languages, I think that they might be the only languages that don't have national official status, but do have EU official status.