Do people use 但愿 nowadays?
While both terms express the idea of "hoping", 但愿 is more for "wishing".

但愿我能上哈佛商学院 I wish I could attend Harvard Business School, (but it's a long shot.)

希望我能上哈佛商学院 I hope I can attend Harvard Business School. (We do not know the speaker's odds of gaining admission from this sentence alone.)

An example I can think of is 但願人長久，千里共嬋娟, loosely translated as “I wish we will  live long so we can admire the autumn moon at the same time though we may be miles apart from each other." In this example, how long a person will live is out of the poet's control. He can only wish that it happens.