Heat 1 tbsp. oil in a large skillet over medium-high heat. Add onions; season with salt and pepper. Cook, stirring, until golden, about 18 minutes. (Reduce heat if onions become too dark.)
Meanwhile, bring a large pot of salted water to a boil. Add cauliflower and red pepper flakes, and cook for 4 minutes. Using a slotted spoon, transfer cauliflower to pan with onions. Cook, stirring, until cauliflower is tender, about 4 minutes. Add kale to cauliflower. Cook, stirring, until kale is tender, about 4 minutes.
Meanwhile, add spaghetti to boiling water; cook according to package instructions. Drain pasta, reserving 1 cup water; add to pan with cauliflower. Add just enough pasta water to create a sauce that coats the pasta. Remove from heat; stir in sardines, lemon juice, and 2 more tbsp. oil. Season with salt and pepper. Serve immediately.