Being that The Goonies is a kids' movie based on a story by Stephen Spielberg, who also served as executive producer, the ending isn't going to have a lot of ambiguity that needs sorting. Yes, the boys elude the Fratellis and find One-Eyed Willy's treasure. Yes, it saves their town from being turned into a country club. (One loose end? What about the poor land developer whose country club project had to be scrapped? Did they keep their job?)
There's also a tidy moral about greed. The greed of the country club developer is the original reason for the boys' adventure. When they locate One-Eyed Willy's treasure, Mikey (Sean Astin) insists that they only take what they need and leave the treasure sitting on a scale as a sign of respect for the dead pirate. When the Fratelli's show up, they have no scruples about honor and take all of it, which triggers a booby trap that nearly kills everyone. So, greed: bad.
Some of the boys get character arcs. Mikey's older brother Brand (Josh Brolin) starts off the film as a bully, but seeing Mikey's heroics on their adventure gives him a new respect for his little bro. Meanwhile, being that this is a coming-of-age movie, Mouth (Corey Feldman) learns a little self-reliance... in the form of giving up his asthma inhaler, which the movie treats as if it's a crutch. Maybe don't take that specific lesson to heart.
But all of that is secondary to the real heart of the story: Chunk (Jeff Cohen) and Sloth (John Matuszak).