Wales risks losing £500m of EU cash unless it spends it