Prediction in complex systems at criticality is believed to be very difficult, if not impossible. Of particular interest is whether earthquakes, whose distribution follows a power law (Gutenberg-Richter) distribution, are in principle unpredictable. We study the predictability of event sizes in the Olmai-Feder-Christensen model at different proximities to criticality using a convolutional neural network. The distribution of event sizes satisfies a power law with a cutoff for large events. We find that prediction decreases as criticality is approached and that prediction is possible only for large, non-scaling events. Our results suggest that earthquake faults that satisfy Gutenberg-Richter scaling are difficult to forecast.