Heat the oil in a large pot. Cook the onions, carrots, and celery over medium heat for 3-4 minutes.
Add the garlic, salt, thyme, rosemary, and black pepper. Cook for 1 minute, stir frequently.
Add the broth and bring it to a boil. Lower the heat, cover the pot, and simmer for 15 minutes.
Add the ham, beans, and potatoes. Cover the pot and cook the soup for 15 minutes.
Finally, add the defrosted peas, cover, and cook an additional 5 minutes until the potatoes are tender and the peas are heated through.
Taste and add salt, if needed. Serve the soup with lime wedges and crusty bread, if desired.