Rub goat leg with ⅓ cup Diamond Crystal or 3 Tbsp. Morton kosher salt, working into flesh and fat. Wrap tightly in parchment or wax paper and chill at least 3 hours and up to 3 days.
Place a rack in lower third of oven; preheat to 350°F. Evenly scatter onion, garlic, guajillo chiles, ancho chile, chiles de árbol, ginger, cloves, tomatoes, peppercorns, oregano, and cumin across a large roasting pan and place a roasting rack on top. Unwrap goat leg and set on rack. Pour 4 cups water into pan and cover tightly with foil. Bake until meat is pulling away from the bone and shreds easily with a fork, 4½–5 hours.
Let leg sit (still covered) until cool enough to handle (about 1 hour). Shred meat into small pieces and place in a large bowl; discard bones. Remove ginger from pan; discard. Working in batches if needed, purée liquid and aromatics left in pan in a blender until smooth. Pour half of consomé over meat and mix to coat. Taste and season with more salt if needed. Cover and set aside. Pour remaining consomé into a medium bowl and set aside for serving.
Toss cucumbers, onion, lime juice, basil, and salt in a medium bowl. Add 1–4 chiles, depending on their heat and how spicy you like things, and let sit 10 minutes.