There are a set of verbs (I've seen them called "labile", "ergative" and "subject-object ambivariant") that have this property. These verbs have a transitive and intransitive form. The object of the transitive form is the subject of the intransitive form
The door opened (intranstive)
Joe opened the door. (transitive)
The difference in meaning is that the transitive form has an explicit actor. The intransitive form means that the door open by itself.
The passive form allows us to imply the existence of an actor, without identifying that actor.
The door was opened.
This sentence means the transitive meaning of "to open" is used, and it implies that "somebody opened the door".
So the difference between sentence 1 and 2 is in 1 "I engaged myself in the affair". but in 2 "I was engaged by somebody else..."
3 is correct. But 4 is an error, because "publish" is not a labile verb. It doesn't have a (common) intransitive form, whose a subject that is the object of the transitive form.