Only when you are competitive can you be beautiful.
General idea: Many talented people compete to show their intelligence, and (the country) is proud, harmonious, happy and prosperous.
The second half of the sentence may mean that the dynasties in this country reached prosperity.
Dong is an ancient writing method of "group", which is very common in calligraphy. For example, "I am a wise man" in Preface to Lanting Collection.