Hi there,
I have a very similar issue. Mac Mini M1 basic 8GB model.
The very first time when I switched on my brand new mac mini and went through the set up, everything was fine. Then I installed Adobe Creative Cloud, Photoshop and InDesign. I did several test about the performance of this computer and I was more than satisfied.
Next day when I switched on and try to log in to my account for the first time it started to show some short magenta lines, and restarted itself without logging me in. The whole thing repeated 4-5 times until I could finally log in. Just after every restart when you can see the white apple logo on the black screen, my monitor lost the signal for a sec or something.
I tried many times to shut down my mini wait a few minutes, or just restart from the menu, I could never log in for the first time, I always saw that signal lost, and the magenta lines just after typing my password.
I called apple support several times and finally I took it to the service. They did some tests reinstall the OS, did some test again, and said my Mac Mini is just perfect. There is no any issue. They suggested to try another HDMI cable and/or different displays.
I've just done all this things today. I could log in at every single attempts today, but I always had the signal lost and the magenta lines on three different monitors, with two different cables. No other displaying issues after logging in. So, basically there is nothing that can affect my user experience if I close my eyes just when I turn on my brand new computer, and type my password. But I'm not happy with this.
I really hope that this is some kind of OS issue and not a hardware problem, so it will be fixed in the next version.
Best,
Zoltan