Yes, pasta should be cooked in boiling salted water before baking because it will not fully bake in the oven. Take care that you cook the pasta al dente, meaning it still has a little bite to it, so it's the perfect texture (not soggy) after it's baked.