Place the beans in a shallow bowl and lightly mash with a fork. Wash the greens (don’t dry), remove ribs, and roughly chop.
Heat 1 tablespoon of oil or butter in a large skillet over medium heat. Add shallot, chile flakes, and garlic, and cook until the shallot softens and begins to color, 2–3 minutes. Add greens (with a little water still clinging), add salt, and cook, stirring often, until very tender, 8–15 minutes. Add a splash of water as needed to prevent sticking. Cooking times vary among greens—when using a mix of greens, add heartier greens to the pan first. Season to taste with salt and pepper and set aside.
Heat the remaining tablespoon of oil or butter in a large skillet over medium heat. Add as many tortillas as will fit in a single layer and warm for 1–2 minutes. Sprinkle cheese over half of each tortilla, spoon over some greens and beans, top with more cheese, and fold to close.
Cook the folded quesadillas until golden and crisp on one side, 1–2 minutes. Flip and cook until the second side is browned and the cheese is melted, another 1–2 minutes. Repeat with remaining tortillas. Keep finished quesadillas warm in a 250°F oven. Serve with salsa, lime wedges, and/or guacamole.