Arrange a rack in the middle of the oven and heat the oven to 425ºF.
Prepare the following, adding each to the same rimmed baking sheet as it is completed: Pat 1 (about 8.8-ounce) package halloumi dry with paper towels and cut into 1-inch cubes. Trim 1 pound summer squash, halve lengthwise, and cut crosswise into ½-inch pieces. Cut ½ medium red onion into 1-inch chunks. Smash and peel 4 garlic cloves. Pull away the flesh from 1 preserved lemon and discard. Rinse the skin well and thinly slice.
Add 1 pint grape or cherry tomatoes to the baking sheet. Drizzle with 2 tablespoons olive oil, season with ½ teaspoon kosher salt, ¼ teaspoon black pepper, and ¼ teaspoon red pepper flakes. Toss to coat and spread out in a single layer.
Roast, tossing halfway through, until the halloumi is softened and browned in spots and the vegetables are tender, 25 to 30 minutes. Meanwhile, pick the leaves from 8 fresh mint sprigs and finely chop (about 2 tablespoons).
Let the halloumi and vegetables cool for a few minutes. Sprinkle with the mint and gently toss to combine.
