Player placed walls can negate spawning, but offhand I'm not aware of any blocks that explicitly prevent spawning. Generally there seems to be some fall-through default when all else fails. The good news is that I think I have a way to challenge this to see what happens. Certain spawns are contingent on biomes or elevations. Having a spawn target of Hellstone or Ash Block at the surface level most likely isn't going to yield Fire Imps or Lava Bats.
I've spent some time poking around in the code, but it's a big tangled maze of if this, else this, else if that nested checks almost entirely handled in one function. While certain specifics are relatively easy to pin down, the broader logic is a bit of a mess to follow. At the very least, observations I've made recently have me starting to wonder about the relationship between the block that's selected and where enemies spawn, making me think the
NPC Spawning entry on the wiki might be over-simplifying the process. I've noticed things happening like Wall Creepers and Black Recluses spawning well outside the spider nests and hallowed/corrupt enemies showing up removed from where they ought to be spawning.
More to follow later.