Cook bacon in a large skillet over medium-low heat until lightly browned and crispy, about 10-12 minutes. Use a slotted spoon to remove bacon to a paper towel-lined plate.
Remove about half the bacon fat from the pan and set aside (you'll have about 2-3 tbsp fat remaining). Add sliced onions and balsamic vinegar to the pan.
Cook onions slowly over low heat until they're deeply caramelized and soft, about 20-25 minutes. You want them to melt into the bacon fat — this is where the jam gets its depth.
Add roasted poblano peppers, fresno chili, minced garlic, star anise, paprika, coriander, cinnamon, and coarsely ground black pepper. Stir and heat through until fragrant, about 1-2 minutes.
Pour in white vinegar, brown sugar, bourbon, and frozen raspberries. Stir well.
Cook and stir for 4-5 minutes or until you no longer smell the alcohol burning off. The raspberry juice will start to release into the pan.
Add the cooked bacon back to the pan and stir to combine.
Reduce heat to medium-low and let the mixture simmer uncovered, stirring occasionally, until it reaches jam consistency — about 15-20 minutes. You're looking for a thick, slightly chunky texture, not a thin sauce.
Remove from heat and stir in the finely chopped fresh basil. Season with salt to taste.
Allow bacon jam to cool completely before transferring to jars or containers.