Bring a large pot with lightly salted water and to a rolling boil. Stir in the frozen pierogies and return to a boil. Cook uncovered, stirring occasionally, until the pierogies float to the top and the filling is hot, 5 to 7 minutes. Drain.
Heat the olive oil in a skillet over medium-high heat. Add the pork and cook, stirring occasionally, until the pork is no longer pink in the center, about 5 minutes. Transfer the pork to a large mixing bowl along with the cooked pierogies. Add the cream of mushroom soup, sour cream, milk, corn, and onion. Season with rosemary and pepper; stir. Pour into a 2-quart casserole dish and sprinkle with Cheddar cheese.
Bake in the preheated oven until the cheese has browned and the casserole is heated through, about 30 minutes.