You ask "ethical", and asked on academia.stackexchange.com, rather than law.stackexchange.com. This makes this question considerably more complex and interesting than it seems at first sight.
As Daniel and Taw point out, if it's explicitly permitted under licensing terms, then it's almost-definitely legal.
If you are confident that you are definitely violating copyright law, perhaps because you are charging money for copies without permission or something, then it's almost-definitely illegal.
Between the two is the grey-area legal crapshoot called "fair use", which is where you can essentially ignore copyright until the copyright holder comes after you with lawyers, at which point you enter a legal gambling game, where the one with the deepest pockets wins. You either settle out of court and agree to stop, or you go to trial, win or lose, then it gets appealed, you win or lose again, and all the way up to the supreme court or the person with the least money blinks and agrees with the decision. Whether you win or lose is significantly random, but the odds can be pushed to one side or the other depending on your situation.
Firstly, free educational use can be protected under the first fair use consideration of copyright law. You aren't charging for access to the resource when sharing it, so it's arguably nonprofit; and you're sharing it for educational purpose. So far so good.
But sharing a whole work is not usually considered fair use. Sharing any significant parts of the work that were irrelevant to what's being studied would be a copyright violation. However, if every part of the work that you shared was relevant to the course, you might be legally OK even if you shared the whole work.
So, like I say, it's a legal crapshoot. Definitely check with your institution's legal dept to see if they're willing to let you take this gamble, as both you and the institution may be on the hook if you're found to violate the law under their auspices.
So that leaves you in one of three states: legal/illegal/crapshoot.
Establishing legality doesn't answer the question asked.
What you're asking, instead, is whether such behavior would be a violation of ethics, which I interpret to mean professional ethics. That is, the explicit standards of behavior for your profession.
Typically, unless there are powerful conflicts between laws and ethics, professional ethics require one to act within the constraints of the law. Violating copyright to save a few bucks wouldn't typically be considered a powerful conflict: no lives are lost if you do not share that preprint. So, if you're confident it'd be illegal, then it'd be unethical, too.
On the other hand, if the author has explicitly stated, in a license, that they are OK with distribution, then you can be confident that you're complying with their wishes, and your actions would be both legal and ethical.
As always, it's in the grey area that it gets interesting.
To establish whether your ethics support taking the risk, you need to establish what weight your professional ethics place on:
- saving money for students;
- ensuring students have access to necessary materials;
- preventing outdated and incorrect material from being propagated;
- ensuring publisher profits;
- ensuring author profits;
- respecting author wishes;
- leading your students by your example;
- minimizing potential liability for your institution;
- minimizing potential liability for yourself;
- minimizing potential liability for your students;
- giving access to this specific work rather than similar ones;
- not writing your own replacement work;
- morality of action and inaction;
- doubtless more I'm forgetting.
The weighting you give to these factors, combined with the advice from your institution's legal dept, should point you towards a yea or nay.
You didn't mention personal morality in your question, but it is arguably an aspect of ethics. Like with legality, professional ethics typically require one to act within the bounds of personal morality.
But like legality, there are areas of conflicts. We might help someone we are not legally permitted to aid, or in a way we are not ethically permitted to, because we feel morally obliged to act.
Consider a case where you know all your students to be too poor to buy the book, are too poor yourself, your institution is not willing to buy copies for its library, and you are unable to find a sponsor to buy copies; and you are unable to change the curriculum; and you know that this is the only book suitable for teaching the curriculum; and the book is so large or your skill so poor or time so short that you are unable to create teaching materials of sufficient volume and quality to replace it.
In such a case, you arguably have a moral imperative to ensure that your students can learn, and that there is at least a route for them to pass your course.
Some professors appear to navigate this maze of morality, legality and ethics by giving their students a warning not to obtain the book illicitly with a wink and a nod, as you see in the comments to the OP here suggesting using the Wayback Machine, or in this widely-spread tweet by a University of Ontario professor recommending that students avoid a list of free textbook sites.
This places the ball in the students' court, giving them the information they need to pass the course illicitly. Some will miss even such an obvious message, but enough would get the point that the message will spread to most of them.
Some may choose to remain within the rules, and fail, learning that strong morals or ethics are punished. This might not be a lesson you wish to teach.
Others will learn that rules are made to be broken, and so will develop a similar attitude towards things like plagiarism. This too might not be a lesson you wish to teach.
Beware of such unintended consequences.
So, as with ethics, morality is a matter where you have to weigh the pros and cons, direct and indirect, and identify a path for yourself that navigates through your own personal maze of conflicts.
My personal feeling is that the various costs of distributing this preprint would be far too high, and I would not do it, if I were in your place. But that is my morality, and my ethics.