If you shoot a missile costing millions to hundreds of millions at everything, your country will be bankrupt very quickly.
Long range missiles roughly do work the way you described, but if you press the "erase this spot" button and then the tank or soldier moves, you just wasted a missile. You also first need to find the tank, and your missile can be shot down.
Of course there are missiles that are able to track moving targets, but that gets even more expensive, less reliable, etc.
Missiles also have a hard time dealing with heavily reinforced/underground targets, and missiles can't occupy territory.
Who will win: a country that has 100 long range missiles, or a country that has 10000 soldiers spread out in more than 100 groups, with rifles and a couple hundred short range missiles (think Javelin) for good measure?