Heat a medium nonstick skillet over medium heat. Add the pesto and allow it to spread and cook until fragrant, about 1 minute.
Crack an egg into a small bowl and carefully add it to the skillet on top of the pesto. Repeat with the other egg and add it on the other side of the skillet.
Cover with a tight-fitting lid and cook uninterrupted until the whites are set and the yolks are set to your liking, about 2 to 4 minutes.
Spread the ricotta cheese between the two slices of sourdough bread. Slide the eggs from the skillet onto the toast. Season with crushed red pepper and enjoy immediately.
Video
Notes
Storage: Store any leftovers in an airtight container for up to 24 hours, but they are best consumed immediately after cooking.