Heat a Dutch oven or a large saucepan over medium-high heat. Add the coconut oil, and once shimmering, add the onions and carrots along with a pinch of kosher salt. Cook the vegetables for 7-8 minutes, or until they are very tender and lightly browned.
Add the garlic, ginger, chili peppers (if using), lemongrass (if using), and red curry paste, and cook for 2 minutes, stirring to coat the vegetables. If not using a nonstick pan, you'll likely need to add a tablespoon or two of water to prevent the mixture from drying out, sticking, and burning.
Pour in the vegetable broth, stirring with a spatula to scrape up any browned bits stuck to the bottom of the pot. Pour in the coconut milk and stir to combine, then add the cubed butternut squash, soy sauce or tamari, and coconut sugar, stirring to combine.
Bring the mixture to a boil, then reduce the heat to low or medium-low to maintain a rapid simmer for 20 minutes, or until the squash is tender and cooked through. Turn off the heat and use an immersion blender to blend roughly half of the curry. Make sure to leave some chunks of squash intact. Alternatively, transfer half of the curry to a stand blender. Blend until the mixture is puréed and mostly smooth, then return it to the pan.
Stir in the chickpeas and bring the curry to a gentle simmer. Once simmering, stir in the baby spinach or kale, stirring until the greens have wilted.
Turn off the heat, and stir in the rice wine vinegar. Taste for seasonings, adding salt as needed. Tear the Thai basil leaves to release their oils and add along with the chopped cilantro to the curry.
Serve the curry over rice and additional cilantro or Thai basil to garnish.