Thomas Hardy is classified as neither a romantic nor a realistic writer but a naturalistic one. However, since naturalism is in many ways an outgrowth of realism, Hardy probably aligns more closely to the realistic school than to the romantic. Naturalism is literary movement of the late nineteenth and early twentieth century purporting that social conditions, heredity, and environment, in other words harsh and uncaring nature, were the inescapable forces that shaped human circumstances and destiny. In contrast, romantic writing usually includes more idealism, symbolism and even reliance on the supernatural. You are right that Hardy does show some influence of the Romantics in his descriptions of the sweeping moors and the powerful love, but ultimately his characters succumb to naturalistic forces and the outcome of The Return of the Native, with Eustacia Vye caught in the vortex of the river in a violent storm, is strongly naturalistic. Interestingly, the positive "Aftercourses" chapter was not Hardy's choice for the ending of his novel; it was pressed upon him by his publisher in order to please the readers. It has less of the dark naturalism than the rest of the book. It was insightful of you to notice the romantic epigraph; you are right that Hardy shows influences of both schools, but naturalism is clearly closer to realism than to romanticism.