I would keep the uncooked pasta in the freezer. It would be the same as flour for bread nutritionally and would not be good kept on the counter.
As for sourdough, yes, it will go bad on the counter. You can try to keep the starter in the fridge, but it will still have a limited shelf-life. My suggestion would just be to shorten the time the recipe says to let it sit out and see if you can still acheive that sourdough taste. I have accidentally acheived that taste by forgetting about some rolls overnight. They were not rancid, but just had a sourdough taste and bubbles.
I would keep the uncooked pasta in the freezer. It would be the same as flour for bread nutritionally and would not be good kept on the counter.
As for sourdough, yes, it will go bad on the counter. You can try to keep the starter in the fridge, but it will still have a limited shelf-life. My suggestion would just be to shorten the time the recipe says to let it sit out and see if you can still acheive that sourdough taste. I have accidentally acheived that taste by forgetting about some rolls overnight. They were not rancid, but just had a sourdough taste and bubbles.