Prepare the sauce: Preheat the oven to 350 degrees F. Place the hazelnuts on a baking sheet and toast until golden, 10 to 15 minutes. Wrap in a clean towel while still warm and rub to remove the skins.
Heat 1/3 cup olive oil in a 9-inch nonstick skillet over medium heat. Add the hazelnuts, almonds, bread, garlic and red pepper flakes and cook until golden, about 3 minutes. Transfer to a food processor; add the tomato, piquillo peppers, vinegar and 1/4 teaspoon salt and pulse, thinning with water as needed. Add salt and red pepper flakes to taste.
Make the omelet: Whisk the eggs, a pinch of salt and the scallion in a bowl. Return the skillet to medium heat and drizzle with more oil, if needed. Add the eggs and cook about 3 minutes, loosening the edges with a rubber spatula to allow the uncooked egg to run underneath. Sprinkle with the cheese, then layer the ham and 1/4 cup sauce on one side. Cook until the cheese melts and the eggs set, 2 to 3 more minutes. Fold in half to cover the filling. Serve with more sauce, if desired.