Merged layers acquire the properties of the layer into which they are merged (the target layer). Flattening PDF layers hides any content that is not visible when the flattening operation is executed and consolidates all layers.
Merge layers
Flatten layers