Preheat oven to 180c. Lightly oil a rectangular 33 x 23cm baking dish with some of the olive oil.
Bring a large pot of water to a boil, add salt and cook pasta until al dente. Drain in a colander and immediately rinse with cold water, drain again and toss with a tablespoon of olive oil. Set aside.
Beat eggs in a large bowl. Add ricotta and beat until fairly smooth. Add cooked spaghetti, broccoli rabe, black pepper to taste, 1 cup shredded cheese, 1/2 cup Parmesan, bacon, crushed red pepper flakes and 1/2 teaspoon salt and mix well.
Transfer to the prepared baking dish. Top with remaining cheeses. Bake 25 to 35 minutes or until heated through and spaghetti is starting to brown in places. Cut into squares and serve.