Preheat oven to 180ºC (355ºF). Cook the macaroni in a large saucepan of salted boiling water for 10–12 minutes or until al dente. Drain and return to pan. Place the ricotta and milk in a bowl and stir until smooth, add to the pasta and toss to combine. In a bowl, combine the tomatoes and capers, salt and pepper and set aside. In a separate bowl, combine the mozzarella and parmesan and set aside.
To assemble, place ⅓ macaroni mixture in the base of a 1.5 cup-capacity ovenproof baking dish, top with half the spinach leaves and half the eggplant slices. Top with half the tomato mixture and ⅓ cheese mixture. Repeat with remaining ingredients, finishing with a layer of pasta, and top with remaining cheese mixture. Bake for 25 minutes or until the cheese is melted and golden. Serves 8.