Preheat the oven to 400°F. Heat 1 tablespoon of the olive oil in a large skillet over medium heat. Add the onion and carrots and cook 5 minutes, until softened. Add the garlic and cook 30 seconds.
Stir in the tomato paste and thyme and cook 1 minute. Add the lentils and broth, bring to a boil, then cover, reduce the heat to low, and simmer 20 to 25 minutes, until the lentils are tender and most of the liquid is absorbed.
Meanwhile, put the potatoes in a large pot and cover with cold water by 1 inch. Bring to a boil and cook 15 to 18 minutes, until fork-tender. Drain, then mash with the milk, the remaining 2 tablespoons olive oil, and salt and pepper to taste.
Stir the peas into the lentils and season with salt and pepper. Spread the mixture in a 9x13-inch baking dish.
Spoon the mashed potatoes over the lentils and spread to the edges. Bake 15 minutes, until the filling bubbles at the edges.
Serve hot, with black pepper on top.