They are safe for bears to break open, chew, and eat as they wish. Pumpkins may be a little thick and tough for humans to break into, but they are no match for a bear.
Bears do eat whole pumpkins, after they break them open or bite into them, of course. A bear cannot eat a pumpkin whole, but it can chew up and eat a whole pumpkin in several bites.
Bears do eat carved pumpkins, however, they may steer clear of ones that have lights or burning candles inside of them.