For me it would depend on whether the engine block and heads are aluminum or iron. Iron needs paint or it will rust. Painting aluminum is merely decoration.

Adequate preparation can be a problem. Getting the entire exterior of an engine adequately prepped without contaminating the inside can be tricky.

My car has an aluminum block and head LS3 and an aluminum 4L65E trans I wasn't about to waste my time painting either one. You can't even see the transmission. I did have some steel motor mounts and a steel AC compressor mount so I painted those parts with silver engine enamel to go with the bare aluminum.

If you really want a proper prep, every square inch should be sanded and/or etched. When I painted my frame, I did a fair amount of grinding to dress up some ugly welds, but most of the prep consisting of applying phosphoric acid etching solution, to prep it for epoxy primer and satin black urethane paint.

If I was going to paint an engine, I'd just use some spray cans of engine enamel, but if it's not prepped properly, it won't adhere for very long. Peeling paint may look worse than none at all.