Preheat a grill or panini maker. Brush the onion slices on both sides with 2 tablespoons olive oil. Sprinkle with salt and pepper. Grill the onion slices until tender and lightly browned, about 3 to 4 minutes per side. Set aside to cool.
Pull out and remove some of the bread from each half of the rolls. Spoon 1/2 of the sauce over the bottom halves of the rolls. Sprinkle with red pepper flakes, if using. Add the prosciutto slices, grilled onions, meatballs and the remaining sauce. Place 2 slices of cheese on top. Add the tops of the rolls and drizzle with olive oil. Using a pastry brush, brush the oil evenly over the tops.
Place the sandwiches in a panini maker or panini press and cook until the cheese has melted and the meatballs are heated through, about 5 to 8 minutes.