Lightly butter an 8x8-inch baking dish. Rub the top of each slice of bread with the garlic clove. Lay the slices in the dish in one layer, cutting them into pieces where necessary. Season with salt and pepper.
Measure the milk and/or cream into a bowl. Add the eggs, half of the cheese, and a generous amount of salt and pepper. Whisk vigorously to beat the eggs and to combine. Add the basil and stir gently. Set aside.
In a large sauté pan, heat the oil over medium high. Add the onion; cook, stirring occasionally, until it softens and colors lightly, about 5 minutes. Meanwhile, trim the squash, cut them lengthwise into quarters then into 1/3 inch slices. Stir the squash into the onion, spread in a single layer, and let sit undisturbed for 1 to 2 minutes to encourage browning.
Meanwhile, halve and seed the tomatoes and chop coarsely. When the squash is lightly browned, add the tomatoes, stir to mix vegetables and saute 1 more minute to cook off any liquid.
With a slotted spoon, transfer the vegetables to the dish, spreading them evenly over the bread. Place the spinch leaves evenly on the top. Give the milk and egg mixture a stir and gently pour it all into the dish. Top with the remaining cheese. Bake until the milk and egg mixture sets, 40 to 45 minutes. Let cool at least 5 minutes, slice into squares with the edge of a spatula, and use the spatula to lift out the pieces.