Technically you can cook, peel, and keep them in the fridge for up to a week. However, keep in mind that eggs will store well in the fridge for up to 7 days total, including once they have been used in the pasta salad. If you plan to make the entire side dish a few days ahead of time, I wouldn't recommend cooking the eggs more than a day or so beforehand.