Heat your oven to 425˚F and have a 8x8 (or similar-sized) baking dish ready. Give the sweet potato a good scrub and cut it into 1/2" cubes. Place in the pan along with the shallot, olive oil, herbs, and salt. Toss until well combined. Place in the oven and roast for 25 to 30 minutes.
Once the sweet potatoes are mostly tender, create two wells and crack in the eggs. Return the pan to the oven and bake for another 8 to 10 minutes, until the whites are set and the yolks are to your desired doneness.
Top with cheese and crushed red pepper if desired.