Bring a large pot of well-salted water to a boil.
In a 12-inch nonstick skillet, cook the bacon over medium heat, stirring occasionally, until crisp, about 8 minutes. Leaving the bacon in the skillet, pour off all but 1 Tbs. of the fat. Add 2 Tbs. of the oil and the shallot and cook until it just begins to turn golden, about 1 minute. Add the squash and cook, stirring occasionally, until lightly browned and tender, about 7 minutes. Stir in the basil and 3/4 tsp. salt, and remove from the heat. Keep warm.
Mix the ricotta and the remaining 1 Tbs. oil in a medium bowl. Season well with pepper.
Boil the linguine according to package directions until al dente. Reserve 1 cup of the pasta water, drain the pasta, and add it to the squash mixture. Add the ricotta and Parmigiano and toss gently to combine, adding some of the cooking water to loosen the sauce, if necessary. Season to taste with salt and pepper, and serve garnished with basil and cheese.