Move your logs into your submit function (I've changed the button event from submit to click because I'm not sure how your calling it, but click should work for you). See below fiddle for example. You can test it by after clicking the button, run console.log(start) or console.log(end) from the console (F12, console tab on chrome) to prove that the values were saved to the window variables.
IF want them after the form submission (get/post result/data to/from server) then you need ajax or to use hidden html controls and this example won't work.
Excluding ajax, the difference between click and submit is that submit sends data to the server, which returns data and completely refreshes the page, wiping all page level and lower javascript variables since their scope is the page. If you don't need data from the server, then you just need to use click. You can return server data using click through using ajax. Click DOES NOT refresh the page unless you specifically tell it to.
var start = "";
var end = "";
$(document).ready(function(){
$('#test').on("click", function(event){
console.log('here');
event.preventDefault();
window.start = $("#input1").val();
window.end = $("#input2").val();
console.log(window.start);
console.log(window.end);
});
});
See Fiddle here: https://jsfiddle.net/xwfdddsr/1/