Place a non-stick skillet over medium heat. Add the mortadella slices in a single layer and fry for 2-3 minutes per side until the edges are curled and crispy. Remove from pan and drain on paper towels.
Wipe the skillet clean and return to medium heat. Spread the basil pesto into two distinct circular pools in the pan, roughly the diameter of an egg.
Crack one egg directly onto the center of each pesto pool. Lower the heat to medium-low.
Cover the skillet with a lid and cook for approximately 3 minutes, or until the egg whites are fully opaque and set while the yolks remain fluid.
Meanwhile, apply butter to the sourdough slices and toast them in a separate skillet or toaster until golden brown and structurally firm.
Place the cheese slices on one warm piece of toast to allow for residual heat melting. Layer the crispy mortadella over the cheese.
Carefully slide the pesto-fried eggs onto the mortadella layer using a flexible spatula.
Top with baby arugula and red pepper flakes, then close the sandwich with the second slice of toasted sourdough.