In the bowl of a stand mixer or working with a handheld electric mixer, beat the egg yolk, lemon juice, garlic, shallot, and a generous pinch sea salt on medium speed for 1 to 2 minutes. When mixture is pale and opaque, add a splash of olive oil and beat until fully incorporated. Continue beating on medium speed while adding the olive oil a little at a time. Once you've added two-thirds of the oil, you can add it in bigger splashes. After adding all of the olive oil and the consistency is thick like mayonnaise, add sea salt and pepper to taste. Whisk in enough lemon juice so that the aioli is a bit thinner and forms soft peaks. Keep leftover aioli sealed in the fridge up to 3 days.
For the salad:
Preheat the oven to 400° F.
Heat a small skillet over medium heat. Add 2 tablespoons oil, then add shallots. Cook, stirring occasionally, for 5 minutes. Turn heat to low and sprinkle on sea salt. Cook shallots, stirring occasionally, over low heat for 30 minutes, or until they're golden brown and sweet.
Meanwhile, toss broccoli with 2 more tablespoons olive oil and spread on a rimmed baking sheet. Toss the red onions with the remaining 1 tablespoon olive oil and stir them into the broccoli. Sprinkle with sea salt, paprika, and black pepper. Roast for 12 to 15 minutes, or until broccoli has started to brown on the edges and the onions are tender.
Toss the broccoli and onions with 1/4 cup aioli. Fold in the caramelized shallots. Finish with sea salt and pepper to taste, then serve warm. Though best warm, this salad keeps well in the fridge for a day or two.