Preheat oven to 180°C (350°F) and grease a 9-inch baking dish.
Heat olive oil in a skillet over medium heat and sauté diced onions until translucent and slightly caramelized, approximately 10 minutes.
In a large mixing bowl, combine the cottage cheese, beaten eggs, and almond flour until the mixture is uniform.
Fold in the sautéed onions, salt, and black pepper.
Transfer the mixture into the prepared baking dish and spread evenly.
Sprinkle the grated parmesan cheese over the top surface.
Bake for 35 to 45 minutes, or until the center is firm to the touch and the top is golden brown.
Remove from the oven and allow to rest for 5 to 10 minutes before slicing and serving.