Cook and stir margarine and peanut butter together in a saucepan over medium heat until smooth, 2 to 3 minutes. Add 4 cups marshmallows to margarine mixture; cook and stir until marshmallows are melted, 2 to 3 minutes. Remove saucepan from heat.
Stir cereal squares into marshmallow mixture until fully coated and slightly cooled; fold in candy corn, peanuts, and remaining 1 cup marshmallows. Pour mixture into the prepared baking pan, pressing down in an even layer with buttered hands or a buttered wooden spoon. Cool completely before cutting into squares.