Preheat the oven to 220°C. To make the salad, place the tomatoes in a shallow ovenproof dish, cut-sides up. Sprinkle with the garlic and basil. Season with pepper and drizzle the olive oil over. Roast for 10 minutes.
While the tomatoes are still roasting, cook the spaghetti in boiling water for 10–12 minutes, or according to the packet instructions, until al dente.
Meanwhile, dry-fry the slices of prosciutto in a very hot, heavy-based frying pan for 2–3 minutes or until just crisp. Remove and drain on paper towel, then crumble or snip into small pieces. Set aside.
Mix the salad leaves in a serving dish. Add the onion, cucumber and fennel. When the tomatoes are done, spoon them, with all their hot juices, over the greens.
Beat the eggs with the cream, then mix in the ricotta, half of the Parmesan cheese and a little pepper.
Drain the pasta. Return the empty pan to the heat and pour in the egg mixture. Heat for 1 minute over low heat, stirring constantly, then tip the drained pasta back into the pan. Toss the spaghetti with the creamy egg to coat the strands with the mixture. The heat of the pan and the hot pasta will lightly set the eggs to make a creamy sauce. Serve immediately, sprinkled with the remaining Parmesan cheese and the prosciutto, and accompanied by the roasted tomato salad.