Peel, seed and shred squash with a box grater (preferred) or a food processor fitted with a shredding blade.
Heat avocado or other light cooking oil in a large skillet over medium-high heat. Add sage, thyme and chile flakes and toast until sage is crisp, about 30 seconds.
Add squash, salt, a few good grinds pepper and wine and continue cooking over med-high until liquid is almost gone and squash is tender and beginning to brown in places, about 10-15 mins.
Meanwhile, boil pasta in lightly salted water until just shy of al dente. Drain and set aside, reserving about 1.5 cups pasta cooking water.
Add brown sugar and ½ cup pasta water to squash mixture. Cook down once more until water is reduced and squash is thoroughly cooked and threatening to turn into mush, about 10 mins.
Add pasta to skillet with another ½ cup pasta water and cook until sauce and pasta come together and pasta is al dente, about 5 mins, adding more pasta water a splash at a time if necessary. (If dish is becoming salty, use regular water.) Taste and adjust for salt and pepper, if needed.
Turn off heat and gently stir through olive oil. Serve immediately.