Cook the acini di pepe pasta according to package directions. Drain well and rinse with cold water to stop the cooking. Transfer to a large bowl, cover, and refrigerate overnight.
Drain the pineapple and mandarin oranges, reserving 1 cup (240 ml) of the combined juices. Place the drained fruit in a covered container and refrigerate overnight.
In a medium saucepan off the heat, whisk together the reserved 1 cup of fruit juice, sugar, flour, and egg yolks until completely smooth.
Place the saucepan over medium-low heat. Cook, whisking constantly, until the mixture thickens to a pudding-like consistency, about 5-7 minutes. The custard should coat the back of a spoon.
For safety, check that the custard has reached an internal temperature of 160°F (71°C) with an instant-read thermometer. Remove from heat.
Pour the hot custard into a separate bowl. Press a piece of plastic wrap directly onto the surface to prevent a skin from forming. Refrigerate overnight.
The next day, remove the pasta, fruit, and custard from the refrigerator. Give the fruit a final drain in a colander to remove any liquid that has settled.
In a very large bowl, combine the chilled pasta and the chilled custard, stirring to coat.
Gently fold in the drained fruit, miniature marshmallows, and 1 cup of thawed whipped topping until just combined. Avoid overmixing.
Serve immediately or cover and chill for at least 1 hour before serving. Garnish individual servings with a dollop of whipped topping and a maraschino cherry, if using.