France and the UK got their own nukes. The rest of NATO got American nukes.
And many NATO countries have pretty advanced militaries. Not large ones in absolute numbers, because they're not large countries, but absolutely more advanced than most non-NATO countries with very few exceptions (like Sweden).
My point, however, is about your claim that all of this somehow subsidised social programs. Those social programs exist independently from US protection. Nobody denies that the US guaranteed the freedom of western Europe (and many other countries around the world). But that and social programs are two completely separate things.