1) Preheat oven to 375 degrees. Line a baking sheet with parchment paper or foil.
2) Arrange the pineapple and tomato slices on the prepared pan and bake for 12 minutes, or until the surfaces appear dry but not yet browned, turning the pieces over halfway through. Remove from the oven and set aside.
3) Heat a cast iron or nonstick skillet over medium-low heat.
4) Spread the butter on one side of each bread slice, dividing it evenly. Place two of the bread slices, buttered side down, on a clean cutting board. Layer two slices of the fontina, half of the ham, three or four slices of the roasted tomato, one or two rings of roasted pineapple, and half of the mozzarella on top of each. Sprinkle with the red pepper flakes (if using). Finish with the remaining slices of bread, buttered side up.
5) Using a wide spatula, place both sandwiches in the pan, cover, and cook until the bottoms are nicely browned, about four minutes. Turn carefully and cook until the second sides are browned, the cheese is melted, and the other ingredients are heated, through, about four minutes longer.
6) Cut the sandwiches in half, if desired, and serve immediately.