In an 8-inch ovenproof nonstick skillet or well-seasoned cast-iron pan, melt butter over medium heat. Add onion and cook, stirring occasionally, until translucent, about 4 minutes. Add broccoli, sprinkle with salt and pepper and cook, stirring occasionally, until just tender, about 6 minutes longer.
Preheat broiler to high and set an oven rack 4 inches from heat source. In a medium bowl whisk together eggs; season with additional salt and pepper. Pour eggs over onion-broccoli mixture, stir to combine, then dot surface with feta. Cook, without stirring, until eggs are set on bottom and beginning to set on top, about 5 minutes. Transfer pan to oven and broil until eggs are set and beginning to brown, 2 to 3 minutes. Cut into wedges and serve hot or at room temperature.