Bring a large Dutch over or pot of water to a boil. Add pasta shells and cook until al dente. Drain, reserving 1 cup pasta cooking water, and set aside; don't rinse the pasta.
Return the Dutch oven to the stove and heat over medium-high. Add butter and onions. Sauté until onion is softened and lightly browned, about 7 minutes. Add garlic and cornstarch. Stir well for about 1 minute.
Whisk in milk slowly to completely incorporate. Add salt, pepper, cayenne pepper, rosemary, and bay leaf. Reduce heat to medium-low and simmer for about 5-10 minutes until sauce thickens, stirring occasionally.
Remove bay leaf and stir in pumpkin. Make sure it is completely combined. Stir in cheeses and mix until cheese has melted. Add in cooked pasta and stir well. Remove from heat and serve. Enjoy!
Recipe from Living Well Kitchen https://blog.memeinge.com/pumpkin-macaroni-and-cheese/