Can "endear" be used for a country or some other inanimate object? For example is 'I have come to endear my country.' correct?
The use of endear is particular, as you can see from dictionaries available online. It means
cause to be loved or liked.
Example: Flora's spirit and character endeared her to everyone who met her.
If something endears you to someone or if you endear yourself to them, you become popular with them and well liked by them.
I would rather say
I have come to cherish my country.