For the broth: Place leeks, carrots, salt, bay leaf, thyme, and undrained canned tomatoes in a large pot with 4 cups of water. Bring to a boil, then reduce heat and allow to simmer 10-15 minutes. Using a fine mesh strainer, drain into a large saucepan, pressing down on the vegetables with a slotted spoon to get as much liquid as possible. Discard the vegetable scraps or save them for composting.
Add the chickpeas, pasta, and rosemary to the vegetable broth. Bring to a boil, then reduce to low heat. Simmer, stirring frequently, until pasta reaches al dente consistency.
Stir in the spinach leaves and continue cooking over medium heat for 2 minutes, until wilted.
Adjust seasoning to taste and serve hot.