Safe to shutdown by pressing power button 1. in bios setting mode 2. in bootloader?
Yes. You are not making changes, and you are not writing data. You are only observing existing settings. Turning the computer off at this point will not damage anything.
Yes. Data is not being written to the hard drive while you are in a bootloader. You will not lose anything or damage anything by turning the computer off at this point.
All that said... repeatedly turning the computer off in a short period of time could damage the power supply and/or motherboard capacitors, or possibly even your hard drive. By "repeatedly" I do not mean twice in 10 minutes. I mean multiple times per minute. Having to turn the power off at these points once in a while is not going to hurt your system. Making a habit of it is only inviting trouble.
Try to figure out why you need to turn the computer off rapidly almost as soon as you turn it on, and try to eliminate this need.