Preheat oven to 400°. Toss squash, oil, brown sugar, and salt in a medium bowl to coat. Spread out in a single layer on a parchment-lined rimmed baking sheet and roast until fork-tender, 30–35 minutes. Set aside.
Heat grapeseed oil in a medium Dutch oven or other heavy pot over medium-high. Add a few mustard seeds to pot. When seeds start to wiggle and pop, reduce heat to medium and add curry leaves (if using), asafetida (if using), and remaining mustard seeds. Cover pot and cook spices, swirling, until mustard seeds start popping more gradually, about 30 seconds. Uncover pot and return heat to medium-high. Add ginger and garlic and cook, stirring constantly, until beginning to brown, about 1 minute. Add red onion and a big pinch of salt. Cook, stirring often and reducing heat if needed to prevent burning , until onion is golden brown and jammy, 7–9 minutes.
Stir in turmeric, then tomatoes and bring to a simmer. Reduce heat to medium and cook, stirring often, until tomatoes are glossy and darkened in color and oil starts to separate around edges of pot, 5–7 minutes.
Add coconut milk and broth and stir to combine; season with salt. Bring curry to a simmer, then reduce heat to medium-low. Cover and cook, stirring occasionally to prevent sticking, 10 minutes.
Add green beans and reserved squash to curry. Return to a gentle simmer and cook until green beans are tender, 7–10 minutes. (If curry gets too thick, add a splash of hot water; curry should have consistency of heavy cream.) Taste and season with more salt if needed.
Ladle stew into bowls and top with fried onions and cilantro. Serve with rice and lime wedges for squeezing over. Do Ahead: Curry can be made 5 days ahead. Let cool, then transfer to an airtight container and chill.