Bounded solutions of a second order evolution equation and applications