The European Commission has pledged to increase funding to Spain to help it cope with a rise in migration across the Mediterranean.