I was keen on an All-in-One when they first came out - less cable clutter, etc - but then I got to thinking about this or that part dying and having to buy a whole new system, so I changed my mind and went for a self-build with the components of my choosing. However that doesn't answer your question.
Firstly, could it be normal behaviour while the machine changes screen resolution between a BIOS type screen to the OS? Or is it something you've only just noticed?
Does the screen flicker, exhibit lines or other anomalies while the OS is loaded, and for any period of time? If not, it could be that your screen is okay and that the lines are a result of the failing HDD while under stress at load/boot. If that's all it is then replacing the dying HDD with a SSD would solve the issue
Thing is, if you are concerned about the screen, by all means get it checked out for your own peace of mind. Not only that, it will help you decide what to do next.... whether you need to get a new machine or just replace the HDD.
Anyway, all the best with it.