She brags about her husband being rich.

Literal

She [topic-は] husband [subject-が] rich is thing [object-を] is-boasting.

ことを自慢する — the nominalizer こと turns the embedded clause (夫が金持ちだ, 'husband is rich') into a noun phrase that becomes the object of 自慢する ('to boast about'). A natural way to brag about someone else's qualities.