Yes. These are two independent procedures: filing in Spain does not close the proceedings before the voivode and does not count as withdrawing from them.
What matters is a different question — on what basis you are present in Spain when you file. A valid karta pobytu lets you travel here and apply. So the question is usually not whether you can, but whether your timing works.
That is what we work out in a consultation: how long the card still runs, how many Schengen days you have used, and when you can realistically file.