How engine is mounted in wing is restricting motion in any direction but is it still resistant to shock loads, or is there any mechanism inside engine associated to bearings that will absorb shock loads that occur in spools?
"Shock" loads on landing can be transmitted to engine components. The original poster appears to be asking about turbine engines specifically. The significance of a hard landing on the engine spools themselves will be shaft flex and case flex, and the possibility of blade rubbing (and erosion). This is a concern with a hard landing, and something that must be considered. There are not "shock absorbing" features or capabilities built into bearings in engine spools; these are intended to have minimal friction in rotation, but no concentric movement about their axis. It is possible in severe turbulence, and in a hard landing, to experience case or blade damage or wear, and there are inspections prescribed for certain components in certain engines to address this.
Back in the early days of the deployment of the C-5 cargo plane, overflexure of the wing-to-fuselage attachment during landings was identified as one reason for the serious cracking in that area which the first revision of the C-5 was susceptible to.
One cause of the overflexure was that during a hard landing, at the moment of touchdown the mass of the engines and the wing itself would sag the wingtips downward as the landing gear was absorbing the shock loads.
One of my engineering professors was involved in a design exercise to study the feasibility of a thrust-vectoring system which, upon touchdown, would briefly deflect the engine exhaust downwards to lift the engines and wing upward and limit the downsag, and thereby extend the fatigue lifetime of the wing-to-fuselage attachment.
To my knowledge, nothing ever came of this proposal- but it represented a case where shock loads on the fuselage caused by the inertia of the engines needed to be managed.