No, you don't need completely ripe pears if you're using them to bake. The heat of the oven will soften the pear flesh, and since you're likely going to be using sugar and other spices to complement the flavor of the pear, don't worry about losing the pear flavor! It will still be there in an underripe pear.