For the ranchero sauce: Preheat the oven to 500 degrees F and put the tomatoes, garlic cloves and onion on a rimmed baking sheet. Roast the vegetables, turning occasionally, until blistered and charred in spots, about 35 minutes. When cool enough to handle, remove the papery skins from the garlic.
Meanwhile, bring a small pot of water to a boil. Add the ancho chiles, cover, and remove from the heat. Let sit for 10 minutes, then drain and pat dry.
Put the vegetables and any juices from the baking sheet into a blender. Add the ancho chiles, 1/2 teaspoon each chopped chipotle and adobo sauce and 1/2 teaspoon salt and blend until fairly smooth. Taste; if you want the sauce spicier, stir in the remaining chopped chipotle and adobo sauce.
Heat the oil in a medium pot over medium heat. Add the sauce (it will sizzle) and 1/3 cup water and cook, stirring, until thickened but pourable, about 5 minutes. Taste and season with salt as necessary. Cover and keep warm over low heat. If the sauce thickens too much, add 1 tablespoon of water at a time to thin it out.
For the refried beans: Put the beans in a medium bowl with about half of their reserved liquid and mash with a potato masher until smooth. Heat the vegetable oil in a medium nonstick skillet over medium heat until shimmering, then add the mashed beans and a big pinch of salt and mash again until smooth. Cook, stirring and scraping with a rubber spatula, until heated through. If the beans seem dry, add some more of the reserved liquid until they are creamy. Taste, season with salt if necessary and cover and keep warm over low heat.
For serving: Preheat the oven to 200 degrees F and line a baking sheet with paper towels. Heat 2 teaspoons vegetable oil in a medium skillet over medium heat until shimmering. Add 1 tortilla and cook until the underside blisters, about 15 seconds. Flip the tortilla with tongs and continue to cook until the underside blisters, about 15 seconds. Remove from the pan to the lined baking sheet. Repeat with the remaining 7 tortillas, adding more oil if necessary. Spread about 2 tablespoons of the refried beans on each tortilla and keep warm in the oven.
Using the same skillet the tortillas were fried in, heat 1 tablespoon oil until shimmering, about 1 minute. Crack 4 eggs into the skillet and cook until the edges are crispy and whites are almost set. Cover the skillet with a big pot lid and cook until the whites are completely set, 1 more minute. Remove the tortillas from the oven, top four with an egg, then return to the oven and repeat with the 4 remaining eggs.
Top the remaining tortillas with the remaining eggs. Sprinkle each with a pinch of salt, some ranchero sauce, Cotija cheese, cilantro and onion. Serve immediately.
Copyright 2017 Television Food Network, G.P. All rights reserved.