Heat oven to 375°F. Lightly oil a 9-inch square baking dish.
Warm olive oil in a large skillet over medium heat. Sauté onion until tender, 3–4 minutes.
Add ground beef. Cook, breaking it up, until browned. Drain excess fat.
Stir in garlic, taco seasoning, cumin, and chili powder. Cook 1 minute to bloom the spices.
Mix in tomatoes, black beans, and corn. Simmer 3–4 minutes. Season with salt, pepper, and lime juice. Remove from heat.
Blend cream cheese, sour cream, and salsa in a bowl until smooth and spreadable.
Spread half the refried beans in the dish. Top with half the cream mixture, 1 cup shredded cheese, and half the beef mixture.
Repeat layers with remaining refried beans, remaining cream mixture, and the rest of the beef. Finish with the remaining 1.5 cups cheese.
Bake 18–22 minutes until hot and bubbling. Broil 1–2 minutes to brown the top if desired.
Rest 5 minutes. Garnish with green onions, cilantro, and jalapeño. Serve warm with tortilla chips.