Preheat the oven to 400 degrees F. Fold the puff pastry sheet in half. On a lightly floured surface, roll the puff pastry to thin out the rectangle and shape it into a 14x5 inch tart pan. Chill for 10-15 minutes to firm up the dough.
Sprinkle the shallots evenly into the bottom of the tart pan and top with half of the cheese.
Spread slices of tomato into the pan, leaving some space for raw eggs either between slices or to the sides (see photos).
Crack 1 egg into a small ramekin or liquid measuring cup. Gently pour/place it onto the tart between tomato slices. Repeat with the remaining 4 eggs.
Top with the remaining cheese, followed by the thyme and oregano. Sprinkle generously with salt and pepper.
Place the tart pan on a baking sheet and then into the oven. Bake for approximately 20 minutes, or until the whites have set. Top with fresh basil before serving.