Heat oil in a medium pot over medium heat. Add onion, garlic, and pepper flakes and cook, stirring, until tender, 6 to 8 minutes. Add broth and bring to a boil. Add broccoli and cook, covered, until bright green and tender, about 2 minutes. Season with salt and pepper. Remove from heat, stir in spinach, and let cool slightly.