Germany's decision to boost defence and infrastructure spending has shaken financial markets in the EU.