Preheat the oven to 425˚. Brush a 24-cup mini-muffin pan (preferably nonstick) with olive oil. Evenly sprinkle the sugar on the bottom of each cup. Unfold the puff pastry on a work surface and cut into 24 equal squares with a sharp knife.
Toss the squash with the olive oil, rosemary, 1/4 teaspoon salt and a few grinds of pepper in a bowl. Place 1 piece in each muffin cup (it’s OK if some of the squash pieces extend above the top of the cups). Press about 1/2 teaspoon cheese on top of each squash cube. Cover each with a piece of puff pastry, tucking the edges into the muffin cups.
Bake until the pastry is golden and puffed, 15 to 20 minutes. Let cool 5 minutes, then remove from the pan. Serve squash-side up.