Bring a large pot of water to a boil. Season well with salt. Add the pasta and cook for 3 minutes less than indicated in the package directions, about 7 minutes. Drain well reserving 1/2 cup pasta water.
Heat a large skillet over medium-high heat until hot. Add the oil, carrot and onion to the skillet. Season with 1 teaspoon salt and cook, stirring often, until fragrant and beginning to soften, about 3 minutes. Add the pepper flakes and thyme and cook another minute. Stir in the drained beans and chicken broth. Reduce the heat to medium to maintain a simmer and cook for 5 minutes, stirring occasionally. Use the back of a spoon to gently mash some of the beans. Set aside.
Add the cooked pasta to the sauce. Sprinkle the grated cheese over the pasta and toss to coat well. Stir in the remaining 1/2 teaspoon salt and add the 1/2 cup pasta water as needed to maintain a creamy, broth-like sauce. Sprinkle in the spinach and cook until wilted.