Preheat oven to 425°F (220°C). Toss cauliflower florets with 2 tbsp olive oil, salt, and pepper, and roast 20 minutes, until tender and lightly browned.
Meanwhile, heat remaining olive oil in a skillet over medium heat. Add onions and cook 12–15 minutes, until deeply caramelized.
Reduce oven temperature to 375°F (190°C).
Combine roasted cauliflower, caramelized onions, and sour cream in a baking dish, mixing gently.
Top with shredded cheddar.
Bake 12–15 minutes, until the cheese is melted and bubbling.