I have been working a little further on it.
I have solved in this way:
Replaced http with https in this line :
$embed_code = '<iframe src="https://www.youtube.com/embed/' . $video_id . '?feature=oembed" width="' . $width . '" height="' . $height . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
of file
[wordpress]/wp-content/plugins/maxgalleria/addons/media-sources/youtube/youtube.php
it becomes therefore
$embed_code = '<iframe src="https://www.youtube.com/embed/' . $video_id . '?feature=oembed" width="' . $width . '" height="' . $height . '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
Then when I add links to youtube videos from maxgalleria I choose this format:
https://www.youtube.com/v/video_id
where video_id is the id of my video in youtube.
In this way, maxgalleria saves the links correctly with https.