Preheat the oven to 400ºF.
Cut off the top, bottom, and outer skin of 6 of the onions. Run a knife down the center from top to bottom stopping at the middle (as shown).
Add the onions to the boiling water and cook until they start to soften but still hold their shape, 10-15 minutes. Drain and set aside until they’re cool enough to handle.
Use the cut side to carefully peel off 4-5 whole layers of each onion, taking care to keep them intact. Set the whole layers aside for stuffing. Chop the remaining inner layers of the onions.
In a sauté pan on medium-high, heat ¼ cup of the olive oil. Dice the remaining 2 onions and mince the garlic, then sauté for 3 minutes. Stir in the harissa and tomato purée. Season with salt and pepper, to taste. Add the rice, lentils, parsley, spinach, baby pistachios, a pinch of salt and pepper, and ½ cup of water. Mix well to combine.
Fill each layer of onion with a spoonful of the mixture and roll up gently to encase the filling. Place tightly into a medium shallow baking dish, Dutch oven, or oven-safe pan. Bake, covered, for 10 minutes.
Pour ½ cup water, red pepper sauce, remaining 3 tablespoons of olive oil over the onions.
Cover and bake for another 25 minutes. Uncover and bake until the onions are slightly golden and caramelized, about 30 minutes more. If you want to add even more color, broil for 2 minutes just before serving.
Serve. Garnish with chopped parsley and toasted baby pistachios and serve.