Preheat your oven to 400 degrees f. and lightly spray a rimmed half sheet pan or a 9x13 baking dish with avocado cooking oil spray.
Add potatoes and shallots then season with sea salt and pepper. Drizzle with the oil and toss really well to evenly coat.
Place the dish into your preheated oven and roast for 15 minutes or so, stirring halfway.
Meanwhile, heat a skillet over medium heat. Add bacon and cook until crispy, then set it aside on a paper towel. In that same heated skillet, add in your spinach, rosemary, and garlic. Sauté, stirring constantly just until spinach is wilted, about 2 minutes.
Once the sweet potatoes are done and fork-tender, remove them from the oven. Stir in your spinach mixture, and make space to gently crack the eggs into the potatoes. Crack each egg in its spot very gently without breaking the yolk.
Return to the oven and bake for 8 to 10 minutes, until eggs are done to your liking.
Quickly chop the avocado and squeeze over some lime juice to prevent it from browning.
Serve the hash with crumbled bacon and chopped avocado as shown and enjoy!