In a large skillet, heat the oil over medium-low heat. Add the onions and cook, stirring occasionally, until softened and caramelized, about 25 minutes.
Preheat the oven to 350°F and grease a 9-by-5-inch loaf pan with cooking spray. In a medium bowl, whisk together the flour, sugar, baking powder, baking soda and salt. In a small bowl, whisk together the sour cream, oil and eggs. Stir into the flour mixture until smooth. Fold in about 1 of the apples, blue cheese and about two-thirds of the bacon. Transfer the batter to the prepared pan and top with the remaining half apple, blue cheese and bacon. Bake until a toothpick inserted in the center comes out clean, about 55 minutes. Let cool completely in the pans, set on a wire rack.