Preheat the oven to 375°F (190°C).
Prepare the filling: In a large bowl, mix fresh spinach, feta, ricotta, dill (if using), and beaten egg. Season with salt and pepper.
Unroll the phyllo dough and cover it with a damp towel to prevent drying out. Take one sheet and lay it on a clean surface, brushing it lightly with olive oil or melted butter.
Layer three to four sheets of phyllo, brushing each layer with olive oil or butter before adding the next sheet. Cut into squares.
Place a spoonful of filling in the center of each phyllo square, then fold the corners towards the center to form a pocket. Gently press to seal.
Arrange the tarts on a parchment-lined baking sheet. Brush the tops lightly with olive oil or melted butter.
Bake in the preheated oven for 20-25 minutes, or until golden brown and crispy.
Remove from the oven and let cool slightly before serving.