If you remove rear coaster brake shoes will it affect the rear gear? If I remove the coaster brake shoes to disable the brake, will it make the gear loose or malfunction?
If your coaster brake system is anything like the one seen in these videos: 
                
            

                
            

You might risk unscrewing the 'çlutch cone' from it's threads on the 'driver' (see image below for which parts are which) when you backpedal (too many turns) with the brake shoes removed. If you could somehow limit the movement of the clutch cone such that it will always stay on the driver you might be good. you could perhaps consider drilling through the driver and installing a bolt which will prevent the clutch cone from screwing off of the driver. maybe alternatively you could think of a way to use a locknut with a big flange or two shallow nuts interlocked with a ring together on the hub axle (part 10) such that the ring/flange sits approximately where part 11 is located (such that the ring/flange prevents the clutch cone from running off the driver's threads), but it might be difficult to achieve that in the limited space.