Season the sliced tomatoes and the cornmeal lightly with salt and pepper. Dredge the tomatoes in the cornmeal. Heat 2 tablespoons of the olive oil in a heavy nonstick skillet over medium-high heat, and fry the sliced tomatoes for two minutes on each side, just until lightly colored. Remove from the heat and set aside.
03Heat the remaining tablespoon of olive oil over medium heat in the skillet in which you cooked the tomatoes, and add the onion and the chopped chard stems. Cook, stirring, until tender, about five minutes. Add a generous pinch of salt and the garlic, and cook together for another minute, until the garlic is fragrant. Add the thyme and the chopped chard, and stir together for minute over medium heat. Season to taste with salt and pepper.
04Beat the eggs in a large bowl with 1/2 teaspoon salt and freshly ground pepper to taste. Whisk in the milk. Stir in the cheese and the chard mixture. Transfer to the gratin dish. Layer the tomatoes over the top. Place in the oven, and bake 30 to 40 minutes, until set and beginning to brown.