Yes! That's EXACTLY what Peter Parker was about from the start and why so many people could relate to him compared to the flawlessly heroic comic book characters of the time.It was how a Spider-Man movie should end. Even when he wins, he usually still loses. That's a STRONG element throughout most of the character's history where he tries his damndest to be the best he can, he usually wins over the villain or conflict, but usually at some sort of cost. About the only film that didn't have Peter taking a huge personal hit was Homecoming, and he still ended up hurting a classmate. Spider-Man 2 netted him the girl, but he lost a mentor AND his best friend.
So the ending of NWH is a VERY "Spider-Man" type ending to me.