Drain pears, reserving 3/4 cup liquid. Discard remaining liquid.
Combine pears, 3/4 cup liquid, and cranberries.
Combine 1 tablespoon flour and allspice; sprinkle over pear mixture, and toss lightly. Spoon mixture into an 8-inch square pan coated with cooking spray.
Combine remaining 1/4 cup flour, oats, and sugar.
Cut in margarine with a pastry blender until mixture resembles coarse meal.