Heat the olive oil in a large pot over medium heat, add the onion, and cook for 5 minutes, or until soft, stirring often. Add the garlic, beef, and sausage. Cook the meat until browned, breaking it up with a wooden spoon. Spoon off as much fat as possible. Add the tomato sauce and diced tomatoes and bring to a simmer. Cook for 20 minutes, sampling occasionally and adding salt and pepper, to taste. Set aside.
Put the ricotta cheese, spinach, egg, basil, Parmesan cheese, and salt and pepper, to taste, into a mixing bowl. Mix to combine.
Melt the butter in a saucepan over medium heat, add the flour, and cook for 1 minute, whisking constantly. Add the milk in three portions, as the sauce thickens. Remove the pan from the heat. Add ¼ cup of Parmesan cheese and salt and pepper, to taste, and whisk to blend.
Preheat the oven to 375°F. Oil a large (at least 13x9-inch), deep casserole. Spread a generous layer of the meat sauce in it. Cover with a single layer of noodles, followed by more meat sauce. Dot with one-third of the ricotta mixture in dollops. Spread one-third of the white sauce around the dollops. Sprinkle with Parmesan cheese. Smooth with the back of a spoon, then repeat each layer twice: noodles, meat sauce, ricotta, white sauce, and Parmesan cheese. (You may not use all of the meat sauce.) Cover the casserole with tented aluminum foil (it should not touch the sauce) and bake for 25 minutes. Remove the foil and bake for 20 to 25 minutes more, or until golden brown and bubbly. Let rest 10 minutes before serving.