“The Math” has no idea what two cards your villain has in his hole cards. Those don’t change from preflop to the river. They are what they are.
Whether he’s bluffing or not, you don’t know. To find out, you’d have to call. But calling with the idiot end of the straight, well, there’s a reason it’s called the idiot end of the straight.
What you need to read here is not the math, it’s the player’s actions. You know with 100% certainty that you’ve got a straight, 4-8. You’ve hit your draw. The only way your hand can improve is if you run out 9T, for a higher straight – but that would actually nullify your hole cards and give the board a community straight, which would mean everyone chops unless someone’s holding a J…
If this player did hit a straight, they screwed up big time by shoving it, driving everyone out of the hand and taking a relatively puny pot compared to what they could have had. On the other end of it, flopped straights can and do get beat sometimes by the river, by flopped sets improving to full houses, mostly. It’s rare, but it can happen.
Sometimes a player will bluff-shove the nuts – that is, having hit the best possible hand on the flop, they’ll shove, hoping that someone will think they’re bluffing, call, and get taken for the biggest possible pot. It works sometimes, but often like it did in this case it ends up closing the hand with no additional chips going in, so they lose value on their great hand, and it’s a bad result.
Thus, I think you played this hand well, aside from limping in the first place. If they did get away with shoving on an air bluff, or on top pair, or a pair of overcards that they felt deserved to win, and needed to end the hand early to avoid someone hitting a straight, you can’t say for sure. But I don’t think I’d go all-in on the bottom end of a straight just to find out.
Only way I’d call here is if the player shoving is a known idiot who has been shoving frequently, and you think it’s highly likely they’re not on a better straight. Or, if it’s late in a tournament, the blinds are big, my stack is small, and I can’t give up any strong hand, and am OK with losing a big pot or going out for the chance to double up or knock an opponent out.