Preheat the oven: Set to 200℃ (400℉). Lightly grease or line a rectangular baking dish (about 9x13 in / 23x33 cm) or a round pie dish (9 in / 23cm diameter).
Prepare the apple filling: In a large bowl, mix the sliced apples with brown sugar, cornstarch, cinnamon, nutmeg (if using), vanilla, and raisins until evenly coated.
Layer the phyllo: Place 1 sheet of phyllo pastry in the baking dish and brush lightly with melted butter. Add another sheet on top and brush again.
Add apple filling: Spread a thin, even layer of the apple mixture (about ½ inch thick) over the phyllo.
Repeat layers: Continue layering — phyllo sheet + apple filling — until you run out of apples. Finish with 2 sheets of phyllo on top, brushing butter between them.
Trim & fold edges: Trim any excess phyllo, leaving about 1 inch (2.5 cm) around the edges. Fold the edges inward to seal the tart. Brush the top generously with melted butter so the folded back layers stick together.
Bake: Place in the oven and bake at 200℃ (400℉) for 15 minutes. Then reduce the heat to 180°C (350°F) and continue baking for another 20–25 minutes, until the top is golden brown and crisp.
Cool & serve: Remove from the oven and let the tart cool to room temperature before slicing. Cut into squares, rectangles, or triangles. Dust with powdered sugar before serving.