Preheat the oven to 350°F and spray a 9x9 baking dish with nonstick cooking spray.
In a large skillet over medium heat, melt butter and brown the frozen pierogis and diced onions in two batches. Set aside to cool slightly.
In a mixing bowl, combine the ricotta cheese, beaten eggs, salt, and pepper.
To assemble the casserole, start by layering half of the pierogis on the bottom of the prepared dish.
Add 1/3 of the ricotta mixture, 1/3 of the kielbasa, and 1/3 of the cheddar cheese. Repeat with the remaining pierogis and other ingredients, finishing with a layer of cheese on top.
Cover the casserole with foil and bake for 40 minutes. Remove the foil and bake for an additional 10 minutes until the cheese is golden brown and bubbly.
Let the casserole cool slightly before topping with sliced green onions and serving. Enjoy!