Pillagers require skylight to spawn from spawners
I use this command to place a spawner of pillager in a enclosure (space caves, houses, dungeons and more).
/setblock ~ ~ ~ spawner{SpawnData:{id:"pillager"}}
But the spawner can not spawn pillager, they can only spawn from spawner in surface.
It won't happened to the other illagers (vindicator, evoker, ravager, illusioner and witch); they can spawn from spawner normally. Only pillager can't spawn from their spawner.