For the marinara sauce: Heat the oil in a medium heavy-bottomed pot over medium heat. Add the onions and cook, stirring occasionally, until very soft, 8 to 10 minutes. Add the garlic and red pepper flakes, if using, and continue to cook, stirring occasionally, until the garlic has softened but not browned, about 3 minutes. Stir in the tomato paste and cook for 2 minutes. Add the crushed tomatoes. Season with salt and pepper and bring to a simmer. Reduce the heat, add the basil and dried oregano, partially cover and simmer gently, stirring occasionally, until the sauce is thickened, about 45 minutes.
Remove the basil sprig. If the sauce is still too chunky, mash the larger chunks of tomato with a potato masher. Season with salt and pepper. Let cool.
For the shells and filling: Bring a large pot of salted water to a boil over high heat. Add the dried pasta shells cook, stirring occasionally, until softened slightly but not cooked. (The pasta shells should flexible enough to be filled but remain very al dente; they will continue to cook during baking.) Drain, then run under cold water to stop cooking. Drain well again.
Preheat the oven to 375 degrees F.
Mix together the ricotta, mozzarella, Parmigiano-Reggiano, parsley and egg in a large bowl until well combined and uniform. Season liberally with salt and pepper. Transfer the filling to a large disposable pastry bag or large resealable plastic bag (or use a spoon for filling directly from the bowl).
Spread 2 1/2 cups of the marinara sauce in a 13-by-9-inch baking dish. Snip off the end of the pastry bag and squeeze the filling into the shells one at a time. Arrange the shells open-side up in a tight single layer in the baking dish as you fill them. Top with the remaining marinara sauce. Cover the pan tightly with foil and bake the shells until the sauce is bubbling throughout and the filling is heated through, about 35 minutes.
Remove the foil from the pan and continue to bake for 10 more minutes to reduce the sauce. Let cool slightly before serving. Top with grated Parmigiano-Reggiano.
Copyright 2019 Television Food Network, G.P. All rights reserved.