Place 3 tablespoons of the oil in a large, deep saucepan or casserole and turn the heat to medium. A minute later, add the onion and carrot. Cook, stirring, until the onion softens, about 5 minutes.
Add the ham if you're using it and cook, stirring, another 3 minutes.
Add the remaining vegetables, season with salt and pepper (go easy on the salt if you've included ham), and cook, stirring, for 1 minute.
Add the stock or water, parsley, and tomatoes and turn the heat to medium-low. Cook, stirring every now and then, until the vegetables are very soft, about 30 minutes. (You may prepare the soup in advance up to this point. Cover, refrigerate for up to 2 days, and reheat before proceeding.)
Sprinkle with the remaining olive oil and serve, passing the cheese at the table.