In a slow cooker, combine the pork shoulder, onion, garlic, chili powder, cumin, oregano, salt, black pepper, and chicken broth. Cook on low for 8 hours or on high for 4 hours, until the pork is tender and easily shreds with a fork.
Once the pork is cooked, remove it from the slow cooker and shred it using two forks. Set aside.
In a large skillet, heat the vegetable oil over medium heat. Add the shredded pork and cook for 5-7 minutes, until crispy and browned.
While the pork is cooking, heat a separate skillet over medium heat. Warm the corn tortillas on both sides until pliable.
In the same skillet, fry the eggs to your desired doneness.
To assemble the huevos rancheros, spread a spoonful of refried beans on each tortilla. Top with a portion of the crispy pork carnitas, a fried egg, shredded cheese, cilantro, tomatoes, red onion, and sliced avocado.
Serve the huevos rancheros immediately and enjoy!