Preheat your oven to 400 degrees F and line a small baking sheet with parchment paper.
Toss the squash cubes with half the olive oil and a pinch of salt and pepper on the baking sheet.
Roast the squash for 15 to 20 minutes until tender and lightly browned.
While the squash roasts, heat the remaining olive oil in a small skillet over medium heat.
Add the sliced onions to the pan and cook until soft and golden brown.
Pour the balsamic vinegar and dried thyme into the skillet and stir until the vinegar coats the onions and no liquid remains in the pan.
Butter one side of each bread slice.
Place one slice of bread butter-side down in a clean skillet over medium-low heat.
Layer one slice of cheese, the roasted squash, the balsamic onions, and the second slice of cheese onto the bread.
Top with the remaining bread slice, butter-side up.
Cook until the bottom bread is toasted, then flip and cook until the second side is toasted and the cheese is melted.