Heat olive oil, cook garlic and shallots until translucent, about 2-3 minutes. Set aside.
Melt butter, whisk in masa harina, cook until golden, about 6 minutes. Gradually add heated milk, whisk until smooth and thickened, about 1 minute. Add salt and nutmeg.
Layer squash slices, garlic/shallots, béchamel, and parmesan in a greased 9×13 dish. Season with salt and pepper.
Bake for 35-45 minutes until golden and bubbling. Broil 3-4 minutes if needed. Slice and serve.
Notes
Use fresh summer squash for best flavor. Adjust seasoning to taste.