> Isn't a shortage simply where demand exceeds supply?I suppose you could put it that way, but it is important to remember that as price rises, demand wanes. As long as price is able to rise, then the demand will keep offering higher and higher prices until the supply presents itself. In the meantime, as offers go higher and higher many will drop out of the market. A shortage occurs when that price is unable to rise, leaving a situation where nobody exits the market. This is the only time that demand exceeds supply.
> In that scenario there will always be some companies lacking no matter how much they pay.
Everyone has a limit. I know of a lot of businesses who cannot afford to pay more than $10,000 per year for a developer. Needless to say they are developer-less. This does not mean that the supply of developers is lacking, it simply means those businesses were never in the market for a developer in the first place.
I don't have the money to pay the hundreds of thousands of dollars for a new Ferrari. That doesn't mean the supply of Ferraris is lacking – they are more than abundant for those who are truly in the market for one – it simply means I don't have enough money, and thus I'm not really in the market for one. We, for obvious reasons, don't count people who simply have dreams of buying something. Every 10 year old kid dreaming about owning a Ferrari is meaningless just every business dreaming about hiring an employee is equally meaningless. Demand is far more nuanced.
> but in the past you certainly could be limited by the number of people in your village as well.
If we take it to the logical extreme and assume there is only one person available for hire, the business which offers the best deal will hire that person, and if nobody can offer a better deal, they're just dreaming. Supply doesn't exceed demand in this scenario. The price rose to the point where all other demand vanished.
A shortage occurs when price cannot rise. Suppose our village with one worker has a law that says the worker cannot be paid more than $30,000 per year. Every business in town is quite willing to pay $30,000 for this worker, and now there's no market solution to determine where the worker should go. This is when demand is able to exceed supply, and when you have a shortage, relying on some other method, like a lottery, to determine where the worker ends up. Such scenarios aren't completely unheard of, but rare. Especially when it comes to labour as most people aren't in favour of placing limits on one's earning potential.
Medical doctors are an interesting exception as we don't feel (where I live, other parts of the world may be different) that the rich should be able to pay a doctor more money to incentivize looking at their stubbed toe while someone of lesser means is having a heart attack without a care provider. Instead, both people are obligated to pay the same amount, and the doctor will judge based on severity who gets the service and who has to wait or be left out.