Hello, on the Spanish Football Federation (RFEF) official website:
https://rfef.es/sites/default/files/images19/001_primera_y_segunda_division.pdf
On page 5. Direct translation:
Regarding the #25, this means that in real world a outfield player could use 25. But I don't know if this can be reflected in FM, so I think the best way is to directly reserve those 3 numbers for the goalkeepers, to avoid confusion and bugs.
The reality is that in 23/24 season, there are only 3 outfield players, in Spanish First Division, who wear #25. Teams usually reserve that number in case they need to sign another goalkeeper.