01 - Heat olive oil in a large skillet over medium heat. Add sliced onion and a pinch of salt. Cook, stirring frequently, until soft and golden brown, about 15 minutes. Stir in balsamic vinegar and cook 1–2 minutes more. Set aside.
02 - Butter one side of each bread slice. Place 4 slices, buttered side down, on a work surface.
03 - Layer each with 1 slice of cheddar, a few slices of pear and apple, a spoonful of caramelized onions, and another slice of cheddar. If desired, spread a thin layer of Dijon mustard on the inside of the top bread slice.
04 - Top with remaining bread, buttered side up.
05 - Heat a skillet or griddle over medium-low heat. Cook sandwiches until bread is golden brown and cheese is melted, about 4–5 minutes per side. Press gently with a spatula for even browning.
06 - Slice sandwiches in half, sprinkle with fresh thyme if desired, and serve warm.