Should I move my village underground before triggering hardmode?
Solution 1:
The only way to prevent both corruption and hallow from spreading around your house is to make a wall of clay or ash (or air) that is at least 4 blocks thick. There are other blocks that may stop the spread, like dungeon bricks or silver/gold bricks, but none of these have been confirmed, so use them at your own risk.
To do this, move away from your house a fair way (left or right) and start building a trench that's 4 blocks thick. Dig it as far down as you'd like (I'd suggest about 30 blocks or so, but any depth is fine) then begin digging a 4 block high tunnel towards your house, passing under, and continuing for as long as you just dug. Then dig upwards with a 4 wide tunnel until you reach the surface.
When your trench is done, fill it in with ash or clay (or at least fill the top of the trench sides in, so that you don't have to jump over the gap). I'd suggest ash because it's so much easier to harvest a large amount of it easily.
The way this works is because hallow and corruption can "jump" 3 blocks to hallow/corrupt any other blocks on the other side. Neither can spread through ash or clay or air though, so it won't be able to reach your house.
What you'll be left with is an "island" of sorts made of regular dirt and stone, surrounded by hallow and corruption. This will prevent harder monsters from spawning at least for a bit away from your house. Keep in mind though that the hallow and corruption will spread completely around you, including through your mining shaft if you built one under your house. It shouldn't spread up your shaft if you built the clay/ash through the shaft (minus the actual shaft of course), but you will have underground corruption/hallow underneath your house at whatever depth you decided to dig your clay wall down to.
With all of that said though, you should be safe from monster spawns if you have all the NPC's even if corrputon/hallow has spread all the way through your house, but harder mobs will start spawning much closer to your house when you stray away from your npcs. This can become a problem if there's corruption close by, as the corruptor's projectiles can convert blocks to corruption blocks. My advice is to build the island, and then plant hallowed seeds on either side of the island so that you don't have to worry about corruptors.