Preheat the oven to 375°F. Butter or oil an 8x8-inch baking dish.
Combine spinach, onion and 1/4 teaspoon salt in a large skillet and cook over medium heat, stirring frequently, until onion is tender and most of the liquid has evaporated from spinach, 6 to 7 minutes. Transfer to a medium bowl and let cool slightly. Stir in about two-thirds of the feta. In a blender, combine milk, cottage cheese, eggs and remaining 1/2 teaspoon salt. Blend until smooth.
Arrange 2 matzohs in the bottom of the prepared baking dish and top with half the spinach mixture. Top with 2 more matzohs, remaining spinach and remaining 2 matzohs. Pour milk mixture over top and sprinkle with remaining feta. Cover the dish with foil and bake 30 minutes. Remove the foil and continue to bake until top is browned and egg is set, 15 to 20 minutes longer. Cool 15 minutes before serving.