Preheat the oven to 450°.
Fill a large bowl with ice water. In a deep skillet or pot, bring about 4 inches of water to a boil. Salt the water, add the broccoli rabe and cook until crisp-tender, about 2 minutes. Drain; transfer to the ice water and let cool. Drain and pat dry. Chop the broccoli rabe into 2-inch pieces.
In another large bowl, whisk the eggs and ricotta; season with salt and pepper.
In a 10-inch cast-iron or other nonstick ovenproof skillet, heat the oil, two turns of the pan, over medium-high. Add the broccoli rabe and season. Cook, tossing often, until heated through, 2 to 3 minutes. Add the chiles and garlic and toss 2 to 3 minutes more. Add the egg mixture and cook until set around the edges, about 2 minutes.
Transfer the skillet to the oven and bake until the eggs are almost set in the center, 8 to 10 minutes. Top with the mozzarella, then the tomato slices, then the pecorino. Bake until the cheese melts and the eggs are set in the center, 7 to 8 minutes more. Let cool until set, just a few minutes. Top with the basil and cut into wedges.