Heat olive oil in a large pot or Dutch oven over medium heat; cook and stir onion and garlic in the hot oil until lightly browned, about 10 minutes. Add vegetable broth and bring to a boil.
Mix potatoes, black-eyed peas, carrots, zucchini, spinach, parsley, and bay leaves into the broth. Season with salt and black pepper. Bring to a boil, reduce heat, and simmer soup until peas are tender and flavors have blended, 1 1/2 to 2 hours.