By the rules as written, the bugbear is not in the area that causes damage, so it won’t take damage.
One side of the wall, selected by you when you cast this spell, deals 5d8 fire damage to each creature that ends its turn within 10 feet of that side.
The bugbear is 15ft away.
A creature takes the same damage when it enters the wall for the first time on a turn or ends its turn there.
The bugbear is not entering the wall. It sounds strange, I agree. Another strange possibility is that another creature can cross the space with the bugbears arms without any issue, which again sounds strange.
Do the above make perfect sense? Not really. For these edge-cases, which are not covered by the rules (in this case, being able to grapple something that is 10ft away from you), the DM should use common sense and make rulings that the table agrees with.
Different groups will prefer different approaches. At my table, I’d make the bugbear not take any damage, and the grappling space with his arms would be difficult terrain (if some other creature decided to run across it somehow). Another reasonable ruling would cause damage to the Bugbear but grant him a Dexterity save. Other tables would come to their own conclusions.
PS: as the other answer stated, this 10ft grapple is only valid on the bugbear’s turn, when it attacks. After that, the enemy is no longer grappled. So most of the argument is pointless, the Bugbear will not end its turn inside the “danger zone”.