Spain has an extremely large number of illegal immigrants ( which is what anyone without a visa is), a good percentage coming from Central America.
The authorities went through a regularisation process last year, but there were many more applicants than the quota. However, it is possible for your boyfriend to legalise his situation: he needs to contact a Gestoreria, who will assess his situation. If he can provide an offer of a declared job contract, and proof of abode in Barcelona/Girona, he may be able to get his papers, although it will take time and he will have to pay the Gestor.
However, it is worth trying as there is not usually a fine for overstaying the visa if it is proven that he wishes to legalise the situation, and also once the process for his papers has begun, there is a moratorium which prevents his being deported - at the very worst, until his application is rejected.
Btw, I lived in Barcelona for nearly 8 years up until this March, so I know the local situation well - the worst thing that he can do is to ignore things, as sooner or later he will be controlled for his papers, and deported once he cannot produce.