Since this is an online game, experience gained is calculated at the beginning of the last round. Meaning that when you use your last attack the game has already calculated which pokemon will faint, how much experience you will gain and if you will level up. This gives you the impression that the bar doesn't go up when you see how much experience you have gained.
I had the same problem when I first started playing, but you just have to get used to it.
Also, you will notice that when you level up and you're about to learn a new move, the pop up window appears before the battle even ends.
As far as I know the only NPCs that don't give experience are the Red named Bosses and maybe some other optional bosses as well.