Poke the rounded end of each egg with a pushpin to help prevent cracking, and lower eggs into a saucepan of boiling water to cover. Bring the water back to a boil, then simmer the eggs very gently for 10 minutes. Drain and cool in ice water for at least 15 minutes, or until the centers of the eggs are completely cool.
Peel the eggs and cut each into 6 wedges. Arrange the wedges in a 6-cup gratin dish or baking dish.
Preheat oven to 400°F
Heat the oil in a skillet over medium-high heat until hot but not smoking. Add the onions and sauté for about 2 minutes.
Then add the garlic, thyme, salt and pepper. Crush the tomatoes into pieces and add them along with their juices to the skillet. Bring the mixture to a boil, reduce the heat, and simmer, covered, for 4 minutes.
Pour the onion-and-tomato mixture over the eggs in the gratin dish and sprinkle the cheese on top. Bake 10 minutes.
Heat the broiler and when the gratin is cooked, broil 3 to 4 inches from the heat source for 2 to 3 minutes to brown the top.