Cook the pasta in boiling water to not quite al dente according to the package directions. Drain and transfer to a casserole dish.
Add the olive oil to a large pot over medium-high heat. When the oil is hot, add the onion and cook for a minute or so to slightly soften. Add the butternut squash and season with salt and pepper. Pour in the stock, bring to a boil, reduce to a simmer and cook until the squash has softened, about 5 minutes. Puree in the pot with an immersion blender.
Stir the squash mixture into the casserole dish with the pasta, then mix in the peas, red pepper and goat cheese. Cover the pasta mixture with the grated cauliflower, then season with salt and pepper. Top with the mozzarella, Parmesan and half the parsley.
Bake until the casserole is browned and bubbling, 40 to 45 minutes. Sprinkle with the remaining parsley.