But no one else has a standing army in this scenario so there is no such modern military that can conquer you before you can remilitarize. The moment one country starts militarizing in a world without militaries, you know their intentions and can start remilitarizing to counter.
But let's say Costa Rica had a standing army - are they going to stop that modern military from conquering them? Probably not, so why waste money on a half assed defense?
The issue is that while someone is building an army, the rest of the world might stand by and do nothing in hopes that the army won't be used, via appeasement and negotiation, particularly if the world's culture is strongly set against having armies. At least until the aggressor starts conquering. That's how it tends to play out historically, so countries and kingdoms go to the trouble and expense of having standing armies, or being able to call them up quickly enough. Because there's always potentially someone who gains power that wants more, and plenty of people willing to follow.