Preheat oven to 425°F. Line a large rimmed baking sheet with parchment paper.
Toss together gnocchi, broccoli, onion, pesto, and crushed red pepper on prepared baking sheet until the mixture is completely coated; spread in an even layer.
Roast until vegetables are tender and gnocchi start to brown, 20 to 25 minutes, stirring halfway through cook time.
Sprinkle with feta, and serve.
