Position a rack in the lower third of the oven; preheat to 425 degrees . In a large bowl, mix the stew, peas, onions and rosemary. Divide among four 2-cup ramekins. Unfold the pastry. Using kitchen shears or a sharp knife, cut out rounds at least 1 inch wider than the diameter of the ramekins, gathering the scraps and pressing together, if necessary, to make 4 rounds. Brush the rims of the ramekins with some of the beaten egg. Drape the pastry rounds over the ramekins, pressing to seal. Brush the pastry with the remaining beaten egg. Transfer the ramekins to a rimmed baking sheet. Bake until the pastry is golden-brown and cooked through, tenting with foil if browning too quickly, 20 to 25 minutes.