If a primitive is explicitly hidden for a view it will not cast a shadow. That can be overridden per-primitive such that they will cast a shadow even when hidden:
/**
* If true, the primitive will cast shadows even if bHidden is true.
* Controls whether the primitive should cast shadows when hidden.
* This flag is only used if CastShadow is true.
*/
UPROPERTY(EditAnywhere, AdvancedDisplay, BlueprintReadOnly, Category=Lighting)
uint32 bCastHiddenShadow:1;
See FPrimitiveSceneProxy::IsShadowCast for the code that decides whether a primitive casts a shadow or not.