Position a rack in the upper third of the oven and preheat to 350 degrees F. Cut the chard stems crosswise into slices 1/4 inch thick. Coarsely chop the leaves.
In a large fry pan over medium heat, warm 2 tablespoons of the olive oil. Add the onion and saute until tender, about 6 minutes. Add the chard stems, season with salt and saute about 4 minutes. Add the chopped leaves and saute until tender, 2 to 3 minutes. Transfer to a plate. Set aside.
In a large bowl, lightly beat the eggs with the garlic and cheese. Season with the cayenne, salt and black pepper.
Gently squeeze the liquid from the chard and stir in the egg mixture. In an 8-inch ovenproof fry pan over medium-high heat, warm the remaining 2 tablespoons olive oil. Add the egg mixture, reduce the heat to medium and cook until the eggs are set around the edges, about 5 minutes. Transfer to the oven and cook until set, 7 to 9 minutes longer. Let cool briefly.
If desired, invert the frittata onto a large plate. Cut into wedges and serve right away. Serves 4 to 6.