In a small pan filled with water, parboil the garlic cloves, until tender, about 8 minutes. Place cloves and Marsala wine in blender and puree until smooth. Combine with cream and set aside.
Lightly grease an oval au gratin dish or rectangular oven-proof dish and arrange 1/3 of each of the potatoes and the pears. Dot potatoes with 1/3 of the cheese and sprinkle with a little salt and pepper. Top with 1/3 cup of pecans and 1 teaspoons of the rosemary. Repeat this layering 2 more times.
Pour the garlic cream mixture over the top of the potato layers and bake, covered with foil, for 25 minutes.
Remove foil and bake another 20-35 minutes longer or until almost all of the cream mixture is absorbed and the potatoes are tender.