Melt the butter in a large skillet over medium heat. Add the sliced onions and cook, stirring often, until they turn soft and golden brown, about 20 minutes.
Heat the oven to 400°F. Place the pie crust in a tart pan or pie dish and prick the bottom with a fork.
Sprinkle half the Gruyère cheese over the crust. Spread the caramelized onions on top, then add the remaining cheese.
In a bowl, whisk the eggs, heavy cream, salt, and black pepper until smooth. Pour the mixture over the onions and cheese.
Bake for 25 to 30 minutes until the filling is set and the crust is golden. Let the tart rest for 10 minutes before slicing.
While the tart cools, place the mixed greens in a large bowl. Whisk the olive oil, balsamic vinegar, and Dijon mustard in a small bowl, then toss with the greens just before serving.