Hi, I understood you to mean that you're in Spain with a visa that allows you to apply for a work/residence permit. You've applied (your paperwork is submitted and being processed) for the work/residence permit before your visa expired. If this is the case then there's no problem.
From my experience, if you've submitted your application for a work/residence permit WHILE your visa was valid, then you've got a piece of paper that shows the application is being processed (en trámite). If the visa expires after you submit the papperwork and during the process, it doesn't matter.
I wouldn't worry about it at all.