This isn't an easy question to answer as there are many aspects to consider. The brighter the star, the smaller the relative photon noise is at the telescope, so it is more difficult to detect transits from distant stars. That being said, the main factor is the planet radius, as we look at flux differences from out and in transits. Thus, we can usually constrain the transit depth with an uncertainty much smaller than the actual flux uncertainty, which help us detect transit for dim stars.
We could probably detect transits for every observable stars in our galaxy that harbour transitting exoplanets if their planets are big enough.
We can also theoretically do as much transit observation necessary to obtain a high enough signal to noise to confidently detect a transit.
For spectroscopic analysis though, there are many more factors to consider. If the planet is covered by high altitudes clouds, then we will most likely never be able to constrain its atmosphere composition. If the atmosphere is too dense, than the transit spectrum becomes flat, as most of the absorption is collision-induced, which doesn't give information on the atmosphere content, except the mean molecular weight.