Is it legal to share an electronic copy of a few book chapters?
In the U.S. the key to this question is whether or not your use is considered fair use. Here is a link that explains more. In determining whether a use is considered fair use in U.S. copyright law, there are four factors:


Character of the use - If the use is personal or educational, it's more likely to be considered fair use than if it is commercial. 
Nature of the work - If the material is factual and published, it's more likely to be considered fair use than if the material is artistic and/or unpublished.
Amount of the work - If you use a small amount of the work, or in the case where your use is transformative (you're not just making a copy) if you are careful not use an amount larger than what you need to achieve your purpose, it's more likely to be considered fair use.
Effect on the market for the original - If your use would be unlikely to affect the market for sale of the original work (even if it were widespread), it's more likely to be considered fair use. Factors that help: taking steps to prevent widespread distribution of the work, if the work is out of print or otherwise difficult to purchase, if the work is not available in the format you need (e.g. digital), if you are sharing a small part of the work, if your use is transformative, etc. (Here, the fact that the students already have access via the university's library, which owns a legal copy of the work, helps your case.)


There are no hard-and-fast rules; you have to use your judgement and weigh all four factors to make a determination. This link has several examples of common copyright-related scenarios in universities.


  What I want to do is not dissimilar to sharing the files with one or two people.


The scenario in which you copy a small part of a factual published work for distribution to a very limited group of people for personal educational use, who can already access a legal copy owned by the university, and you take steps to prevent more widespread distribution, seems completely fine under U.S. copyright law, although IANAL. 

However, distribution to a much larger group (almost 100 people in your class) changes things, because it shifts the balance of the fourth factor away from fair use.  

(Again, all four factors are relevant. If you were copying a single page to share with the entire class, or if you were copying 10% to share with one study partner, it would be more defensible - but sharing 10% of a book with the entire class is less defensible.)

As a reference: this sample campus copyright statement says that "making multiple copies of articles or book chapters for distribution to classmates... would most likely not be considered fair use."