Heat 2 tablespoons of the olive oil over medium heat in a large skillet. Add the onions and saute them for about 5 minutes until they soften; stirring occasionally. Lower the heat a bit and add the garlic and red pepper. Continue to cook the vegetables, stirring often for 15 minutes.
In a food processor or blender, chop the almonds fine. Add the pepper-onion mixture, the vinegar, and the remaining olive oil; blend all to a puree. Add the salt, black pepper, and cayenne. Blend briefly to incorporate them.
Arrange a vegetable steamer over water in a saucepan. Bring the water to a boil, and add the broccoli. Cover the pan, and cook the broccoli over medium heat for 5 minutes or a bit longer, until it is tender as you like. Keep it warm.
Cook the pasta in a large pot of salted boiling water until it is just tender. Drain the pasta, and return it to the pot.
Pour the red pepper sauce, the Parmesan cheese, the broccoli, and the basil into the pot of penne. Heat the contents over medium heat until the pasta is very hot. Mix well. Add more salt and pepper to taste if necessary. Serve the pasta immediately.