We analyze a scheme for preparation of magnetically ordered states of two-component bosonic atoms in optical lattices. We compute the dynamics during adiabatic and optimized time-dependent ramps to produce ground states of effective spin Hamiltonians, and determine the robustness to decoherence for realistic experimental system sizes and timescales. Ramping parameters near a phase transition point in both effective spin-1/2 and spin-1 models produces entangled spin-symmetric states that have potential future applications in quantum enhanced measurement. The preparation of these states and their robustness to decoherence is quantified by computing the Quantum Fisher Information of final states. We identify that the generation of useful entanglement should in general be more robust to heating than it would be implied by the state fidelity, with corresponding implications for practical applications