Heat the olive oil in a large pot over medium heat, and saute the onion and garlic for 3-5 minutes, until softened. Stir in the squash and sweet potato and add a pinch of salt. Saute for 5 minutes. Pour in the broth and stir in the tomatoes, coconut milk, lentils, tomato paste, turmeric, cumin, chili powder, cayenne, and salt and pepper to taste. Stir to combine, then increase heat and bring to a boil. Reduce heat to medium, stir, and simmer uncovered, stirring occasionally, for 30 minutes, until the squash and sweet potato are tender. Stir in the vinegar and chard. Continue to cook until the chard is wilted. Taste, and adjust seasonings as needed.