Shellac begins to deteriorate as soon as it is disolved in alcohol and continues to degrade until it is used and all the alcohol has evaporated.
As the degredation process is slow but continuous and varies with temperature and possibly impurities in the mix it is impossible to say how long the shellac will stay 'good' after it is mixed.
So the general reccomendation for best results is to ony mix as much as you will use on your current project, assuming that you will do all the finishing over a reasonably short time frame like a couple of weeks.
As to safety issues I agree that there is no reason to suppose you could not clean the jars adequately for later use for food, but why reuse them?
A more important safety consideration is that glass jars break easily, and the mixed shellac is inflammible (also flammible ;-0 ) which is one reason why most solvents are sold in metal containers, not glass. That's another reason to not mix large batches.