If a variable is globally scoped when it shouldn't be then it is consuming memory when it shouldn't be. If the total size of the unnecessary variables is large, you could be wasting a lot of memory. That said, it would take a LOT to use up enough
to really be noticable.
The biggest problem is just with design. It's harder to debug variables that are global when they shouldn't be. It results in poor programming habits that make programs harder to understand and maintain, etc.
It's well worth the time to determine what scope a variable ought to have, and to make it work with that scope. If in doubt, use a smaller scope than you think you need and increase it if you have to. It's much easier to increase a variables
scope than to decrease it.