Preheat to 375°. Thaw out 2 sheets of puff pastry dough.
In a pie pan, or stone, lightly coat with olive oil. Set aside.
Over low heat melt 2 tablespoons of butter. Slice the onion thin, crush and chop the garlic cloves. Pinch off the thyme leaves from 3 sprigs and stir in the caramelizing onion mixture. Cook for about 10 minutes until golden and brown. Set aside.
Slice the potatoes in half and slice thin. I place them in a heat proof dish and cover with water. Cook for 7 minutes in a microwave. Set aside.
In a medium sauce pan melt the other 2 tablespoons of butter. Add the flour and cook on medium heat for several minutes. Add the milk and whisk to incorporate and smooth.
In a mixing bowl add chopped flank, caramelized onions and garlic, béchamel sauce, white wine, chopped rosemary, drained potatoes, cheese, peas, carrots and mix thoroughly. Season with kosher salt and fresh ground black pepper to taste.
Flour a board and roll out the puff pastry. Using one of the baking dishes, trace the outside allowing for about a half inch excess. Cut out stars or any shape with extra dough for topping the dish as a garnish.
Divide the mixture into two individual serving dishes and top with puff pastry. Tuck in the edges to seal and with a knife cut X marks to vent the steam. Brush the pastry top with a beaten egg. Add the puff pastry stars or shape you cut out and brush with egg wash again. Sprinkle with paprika and bake for 40 minutes.