Bring a large pot of generously salted water to a boil while you stem and wash the greens. Wash them in 2 changes of water, lifting them from the water so that the dirt stays behind. Fill a bowl with ice water. When the water comes to a boil, add the chard and blanch for 1 minute. Using a slotted spoon or a skimmer, transfer to the ice water. Let sit just until cool, a few minutes, then drain and squeeze out excess water by taking up bunches of the greens, making a fist around them and squeezing. Chop coarsely and set aside.
Preheat the oven to 375ºF. Oil or butter a 10-inch tart or cake pan or a ceramic dish. Heat the olive oil in a large skillet over medium heat and add the onions. Cook, stirring often, until tender but not browned, about 5 minutes. Add the garlic and cook, stirring, for another 30 seconds to a minute, until the garlic is fragrant. Stir in the greens, herbs, and 1/2 teaspoon salt, and stir the mixture for a minute, until the greens are coated with oil. Remove from the heat.
Beat the eggs in a large bowl or the bowl of a food processor fitted with the steel blade. Stir in the cheese. Stir in the greens, and season to taste with salt and pepper.
Line the pie dish with 7 pieces of phyllo, lightly brushing each piece with butter or oil and turning the dish after each addition so that the edges of the phyllo drape evenly over the pan. Fill with the greens mixture. If using phyllo, fold the draped edges in over the filling, lightly brushing the folded in sheets of phyllo ,then layer the remaining 5 pieces on top, brushing each piece with butter or olive oil. Stuff the edges into the sides of the pan. Brush the top with the butter or oil, and make a few slashes so that steam can escape as the pie bakes.
Bake 40 to 50 minutes in the preheated oven, until the crust is golden. Serve hot, warm, or room temperature.
The blanched greens will keep in the refrigerator in a covered bowl for 3 or 4 days. The dish can be prepared through Step 2 up to a day ahead. Keep the cooked greens in a covered bowl in the refrigerator. You can assemble the pie several hours before baking and keep it in the refrigerator, or freezer. Transfer directly from the freezer to the preheated oven, and increase the baking time by about 10 minutes. The finished tart keeps for a few days, but you must re-crisp the phyllo in a low oven (300º to 325ºF) for 10 to 20 minutes.