Heat olive oil in a skillet over medium heat. Saute carrots, celery, onion, and garlic until onion is translucent, about 5 minutes.
Meanwhile, rinse lentils. Combine water, tomatoes, bouillon, and bay leaf in a large pot on medium heat. Add carrot mixture and lentils. Simmer for about 7 minutes. Add pasta and cook for 3 minutes. Add zucchini and squash; cook until tender but not mushy, about 5 minutes. Add basil, oregano, and pepper.
Remove soup from heat and let sit for 30 minutes, covered.