Heat oven to 350°F. Butter an 8-inch baking dish, round or square.
In a medium pot, cover squash with cold water, place a lid on top and bring to a boil over high heat. When boiling, reduce heat so that the water just simmers and cook squash for about 15 min. or until tender. Rinse under cold water; drain. (Do-Ahead: at this point the squash can be stored for up to two days until you are ready to assemble the gratin.)
Heat olive oil in a non-stick pan and add onions. Sauté on medium heat, stirring often, until softened. Set aside to cool slightly.
In a medium bowl, beat egg, salt and mayonnaise together. Add 1/3 cup of Parmesan, panko, sautéed onion and squash and fold together gently to combine. Season with pepper and more salt, if needed.
Spoon in to prepared baking dish and top with remaining 1/3 cup of cheese. Bake 1 hour or until heated through and cheese is slightly browned. Serve hot.