Looping through a string finding nested brackets
I'm not sure how viable this would be when looking up against large strings with lots of nested brackets [...]


"how viable" is a very vague question.
Two common performance metrics are CPU load and memory load,
perhaps that's what you were trying to get at.
It's good to clarify what exactly you want to know.

In terms of CPU, how will this program behave as the input grows?  


The algorithm does a single pass over all characters of the input.
When the input doubles, the number of operations doubles, roughly.


=> In other words, it's linear.

Can it be any better than linear?


=> No, because we cannot know the positions of the brackets without looking through each character once.



In terms of memory, how will this program behave as the input grows?


Aside from the memory used by the input string,
what consumes memory in this program?


=> The dictionary storing the starting positions of brackets.

How do brackets on the same nesting level impact the memory consumption?
That is, in a string like [][][][]?


=> Since the storage for a [ is removed when the corresponding ] is found, brackets at the same nesting level use a single entry in the dictionary.

How do deeply nested brackets impact the memory consumption?


=> The dictionary has as many entries as the deepest nesting level. As closing brackets are found, entries get deleted. The maximum memory consumed by the dictionary throughout the program is proportional to the maximum depth of nesting encountered.




  So how could this be improved, especially in terms of memory (i.e. large strings)?


The current performance of the program is on the expected order of complexity, so it's fine.
However, a dictionary is not the most natural choice for this purpose,
and its actually overkill.
A simpler data structure, a stack, would have been enough to solve this.
Instead of storing (depth, index) pairs in a dictionary,
you could store just index in a stack:


When you see a [, push the index onto the stack.
When you see a ], pop the last pushed index from the stack.


The result will be equivalent, the depth variable becomes unnecessary.