Heat a skillet over low heat. Add brown sugar, butter, garlic, pepper flakes, and salt; stir to combine and cook until bubbling and sugar has dissolved, 3 to 5 minutes. Stir in apricots and cook until soft and plumped, about 5 minutes. Add rum; continue to cook and stir until liquid has reduced and a thick syrup has formed, about 5 minutes. Remove from the heat and set compote aside to cool, about 15 minutes.
Roll pastry on a floured surface into 2 equal rectangles. Transfer each rectangle onto a sheet of parchment paper. Spread cooled compote onto each rectangle and sprinkle with walnuts. Arrange prosciutto over top, covering compote completely. Roll up each rectangle like a jelly roll, sealing the edge with a dab of water, if needed. Refrigerate until firm, about 30 minutes.
Preheat the oven to 400 degrees F (200 degrees C). Line a baking sheet with parchment paper.
Remove pastry rolls from the refrigerator and slice each into 18 slices. Place slices, cut-sides down, on the prepared baking sheet.
Bake in the preheated oven until pastry is puffed and golden brown, 10 to 12 minutes. Remove from the oven and turn on the broiler.
While pastries are cooling slightly, cut mozzarella into 18 slices. Top each pastry with a mozzarella round.
Broil until cheese bubbles, about 2 minutes. Serve warm with a drizzle of balsamic vinegar over top.