Butter two large ramekins (or a large dish if you want to bake the eggs together). Heat the olive oil in a pan until hot. Add the onions and caramelize for about 10-15 minutes, being careful not to let them burn.
Mix the onions with the Swiss chard and divide between the ramekins. Break an egg into each ramekin carefully, so it sits on top of the Swiss chard/onion mixture. Bake in the bottom of the oven for 10 minutes.
Preheat the grill. Remove the ramekins from the oven, scatter the goat’s cheese on top and put under the grill until the cheese is bubbling.