Preheat your oven to 350°F (175°C). Grease a 9x5-inch loaf pan or line it with parchment paper.
In a large mixing bowl, whisk together eggs, sugars, oil, and vanilla until smooth.
Add the grated pear to the wet mixture and stir well.
In a separate bowl, combine flour, baking soda, baking powder, salt, and spices.
Gradually fold the dry ingredients into the wet mixture until just combined. Do not overmix.
Gently fold in chopped walnuts, if using.
Pour the batter into the prepared loaf pan and smooth the top with a spatula.
Bake for 45–55 minutes, or until a toothpick inserted in the center comes out clean.
Let the loaf rest for 10 minutes in the pan, then transfer to a wire rack to cool completely.
Slice, serve warm or cool ; delicious on its own or with a smear of butter or cream cheese!