I'd be surprised if you got in trouble anywhere if you shoot a bear that is inside your house. A prosecutor would know that even the dumbest jury ever impaneled would recognize that a bear in a house would reasonably be seen as threat worthy of self-defense actions. While a black bear isn't normally aggressive, one that perceives itself as being cornered is perfectly capable of inflicting lethal wounds.
I do not believe I'd be in legal trouble that would jeopardize my freedom. I do however believe several things would happen because I live in New Jersey.
1. They would seize the gun I shot it with.
2. They would probably seize ALL my guns, you know, for safety. Whose safety is in debate, but you know, for safety.
3. I would need to appear at depositions, hearings, or whatever at least once probably several times. This would require that I take off from work.
4. I would probably need to retain a lawyer to make sure I don't get railroaded for something.
5. The proceedings would probably stretch out over months, complicating and stressing my life.
I could be wrong, but there are enough bear lovers (you killed a dolphin of the woods!!) or some prosecutor trying to earn his bones on my back. It's very risky as far as I'm concerned.