As some of the other answers have correctly stated, the Bugbear does not have any ability to grapple at further than the usual 5 feet -- but let's lay that quibble aside. Let's just assume you've polymorphed your ally into a giant and address the real question of whether sticking an arm through a wall of fire will burn.
As written in the wall of fire spell text, "a creature takes the same damage when it enters the wall for the first time on a turn". Does entering require moving your space into the wall, or does reaching through it count as 'entering'?
Well, the rules aren't really clear on that point, but that's okay. The DM can and should make that call. Does it make sense in the context to get burned when you shove your arm through a literal wall of fire? Well, yeah, obviously. So it's entirely reasonable for the DM to rule that the grappling creature gets burned in this case.
It would be equally reasonable to rule that the character takes only half damage from this action since they're exposing less than their entire body to the flames, but then you have to deal with some weird corner cases, like making sure your PCs don't abuse this ruling by sticking an arm in for half damage, and then walking through since they already took the wall damage and it only deals damage the first time they enter it each turn.
Personally, I'd just say the wall does its full damage, whether you stick an arm through or your whole body, but that's really down to how you want to run your game.
To be honest, I would be pretty annoyed if my DM decided sticking an arm into a flaming wall doesn't do damage; that feels like rules lawyering of the most ridiculous kind, to claim you didn't get burned because the square that represents your character's "space" didn't technically move across the line.